kinyerakenneth / lastfm-java

Automatically exported from code.google.com/p/lastfm-java
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Pleeaasse, introduce proper logging #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Seeing (in Caller#call)

if (debugMode) {
    System.out.println("body: " + post);
}

gives me the creepes. I've two requests/wishes in terms of logging:
- Introduce logging, least at a basic level. Not being able to capture in a log 
file what's going on inside a third-party library (lastfm-java in this case) is 
really scary. As it is right now I'm seriously considering not using 
lastfm-java at all - despite all the nice abstraction.
- I see you don't want to depend on any external libs. That's all right but 
please use at least java.util.logging instead of System.out! Those who want to 
use log4j instead of java.util.logging just download the latest release of 
SLF4J and drop these two JARs onto their classpath and everything should just 
work: slf4j-api-x.y.jar, slf4j-log4j12-x.y.jar
If you're curious about how this works, here's more information about SLF4J 
bridging: http://slf4j.org/legacy.html

Original issue reported on code.google.com by marcel@frightanic.com on 3 Jul 2011 at 8:45

GoogleCodeExporter commented 9 years ago
debugMode is legacy code that's only there to actually debug the library (the 
Caller class in particular). You should not have to enable it, unless you run 
into a problem you consider a bug in the library.
I don't plan to introduce any form of logging to the code anytime soon, so I'm 
closing this as won't fix.

Original comment by jannikov...@gmail.com on 5 Jul 2011 at 11:09

GoogleCodeExporter commented 9 years ago
While refactoring the Caller#call method I revisited this issue and replaced 
the stdouts with a proper java.util.Logger

is-/setDebugMode are deprecated and will be removed in the next major release. 
Use Caller#getLogger() to configure the logger.

Original comment by jannikov...@gmail.com on 24 Apr 2012 at 3:13