• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Logging and concurrent users

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello guys.

I would like to tag (and eventually filter) logs from different sessions and/or users in my web app. Is there a way to do that with Java Logging?

I used to do that with MDC & Log4j... is there anything similar in Java Logging so I can set up a filter in the web.xml?

Cheers,

Renato
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Renato Losio:
Hello guys.

I would like to tag (and eventually filter) logs from different sessions and/or users in my web app. Is there a way to do that with Java Logging?

I used to do that with MDC & Log4j... is there anything similar in Java Logging so I can set up a filter in the web.xml?

Cheers,

Renato




You initialize the logging system and then make a session listener which in creation of a session will make a appender and add it to the logger.As soon as the session is destroyed ,you remove the session.You can do the same thing on login of the user.
 
reply
    Bookmark Topic Watch Topic
  • New Topic