aspose 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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.
 
Similar Threads
questions on SLF4J: Defaulting to no-operation (NOP) logger implementation
Searching a large text file...
Java cookies ?
Issue on LOGGING_EVENT table in classic logback
Logging errors from jsp