Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting Error Code to print while using LogBack.

 
Vic Hood
Ranch Hand
Posts: 477
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic