This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Logging slf4j configuration through code. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Logging slf4j configuration through code." Watch "Logging slf4j configuration through code." New topic
Author

Logging slf4j configuration through code.

archit thakur
Greenhorn

Joined: Jul 10, 2010
Posts: 24
Hi,

I am trying to use slf4j and logback libraries for logging in my project. I want to do the configuration through code rather than through xml.







and afetrwards, I am catching localLoger in . and then using it for logging via . Idea about where I have got wrong it is not making the new file logFile.log, and printing log messages on screen.
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8661
    
  23

archit thakur wrote:I am trying to use slf4j and logback libraries for logging in my project...

Archit,

Please DontWriteLongLines (←click), because it makes your thread very hard to read. I suggest that you use the 'Edit' key to break them up; I'd do it myself, but there's a lot of them.

Thanks

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Logging slf4j configuration through code.
 
jQuery in Action, 3rd edition