File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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: 7781
    
  21

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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Logging slf4j configuration through code.