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 Getting Error Code to print while using LogBack. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Getting Error Code to print while using LogBack." Watch "Getting Error Code to print while using LogBack." New topic
Author

Getting Error Code to print while using LogBack.

Vic Hood
Ranch Hand

Joined: Jan 05, 2011
Posts: 477

Hi folks ,
I'm trying to implement the SLF4J +LogBack logging solution to implement logging in my application .
I've modified the Pattern Expression in the logback.xml as below.


And its working fine . However I'd like to print the 'error code ' as well in my log say 404 or 500 as well . Any ideas on how I should be modifying my pattern expression for this?
Thanks.


Learning and Learning!-- Java all the way!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Error Code to print while using LogBack.