Tagged Questions
13
votes
4answers
682 views
What is the correct way to handle debug output in Java?
As my current Java projects grow bigger and bigger, I feel a likewise growing need to insert debug output in several points of my code.
To enable or disable this feature appropriately, depending on ...
13
votes
2answers
351 views
Should You Log From Library Code?
If I am developing a Java library, is it good practice to issue log statements from within the library's code?
Having logging within the library will make debugging and troubleshooting more ...
5
votes
3answers
8k views
SLF4J vs LOG4J Which one to prefer?
I have seen this question but does not answer me. It have a brand new project . I have almost always used Log4J but now I am seeing SLF4J making some waves.What is it that Log4J could not do and we ...
5
votes
2answers
177 views
Is it fine to use logs in the Helper Methods?
I have been doubting for a long time whether or not to have a logger in methods (usually helper methods) like the one below.
Whether we can print it in the method or print the response where the ...
4
votes
4answers
372 views
Rules and advice for logging?
In my organization we've put together some rules / guildelines about logging that I would like to know if you can add to or comment.
We use Java but you may comment in general about loggin - rules ...
4
votes
2answers
264 views
How much logging should I do at production for SQLExcpetions?
I'm writing a small database-centric application in Java Swing that will be used internally in a small company. I haven't much experience with developing production-level applications.
I don't use an ...
-2
votes
3answers
294 views
What's the meaning of “the Sun defect” and how does it differ from the more generic “NIH syndrome”?
I hear people talking about the "Sun defect", often giving the whole mess around logging as an example.
How is it different from the not-invented-here syndrome, which means uselessly duplicating ...