Closed GoogleCodeExporter closed 9 years ago
We log it as a WARNING because we want to make sure that the user is not
"accidentally" overriding one of the default type adapters. We are using the
JDK
logger, so it is possible for you to disable all logging coming from the Gson
library
by adding the following line to your logging properties file:
# Turn off all Gson logging.
com.google.gson.level = OFF
Or you can turn off all JDK logging with:
# Disable all logging
.level = OFF
-----------------
On a side note, would you be able to post the instructions on how you
retrotranslated
the Gson library to run on a Java 1.4 VM?
Thanks,
Joel
Original comment by joel.leitch@gmail.com
on 29 Sep 2009 at 5:30
HI Joel,
Thanks for the update.
I worked around this by telling retrotranslator to keep class literals. The
configuration for the retrotranslator Ant task is as follows:
<retrotranslator target="1.4"
destjar="${destjar}" srcjar="${srcjar}"
smart="true" verify="false" failonwarning="true" keepclasslit="true">
<classpath>
....
</classpath>
</retrotranslator>
However, IMO - that logging should be at DEBUG level by default, because it is
a programmer error, and not a user error.
The programmer should ensure the program functions correctly by writing tests,
etc before shipping to the customer, rather than use log
messages from the library to detect possible errors. Or, the library should
fail hard and fast if an error really exists.
In my case - everything worked fine, and that log message was still being
output as WARN.
Cheers,
Nick
Original comment by npel...@gmail.com
on 29 Sep 2009 at 10:20
I noticed this is marked won't fix. I just spent some time figuring out why our
logs are bloated with this particular message and found my way here. From my
point of view this is indeed debug level information. In general, libraries
should be very conservative with logging above debug level IMHO.
Anyway, am I actually doing something wrong here? I was under the impression I
was using a (well) supported feature of GSon when I implemented a handful of
custom serializers and deserializers.
Original comment by jillesva...@gmail.com
on 10 Dec 2010 at 2:02
Original issue reported on code.google.com by
npel...@gmail.com
on 27 Aug 2009 at 1:17