• 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

Log4j: How to get entire message

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Log4j for logging, and we are required to encrypt the log messages.

In order to encrypt the message, I need the entire message as a text string. For example,

message: "This is a message"
Log file content (based on my appender configuration): [2011-03-31 09:33:42,156]DEBUG - com.test.me.operation1(MyClass.java:107) - This is a message

Is there a way I can get access to the entire message in my java code (i.e. what the logger class is writing)? If I have that, I can encrypt the message.

Thanks,
 
reply
    Bookmark Topic Watch Topic
  • New Topic