slocumbf / owasp-esapi-java

Automatically exported from code.google.com/p/owasp-esapi-java
0 stars 0 forks source link

Enable Flexible Log4j message formatting #85

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Overview:
It's great that a lot of contextual information is written with each log
entry, but there is limited flexibility in what information is logged with
each request and what the message format is.

How about taking advantage of the log4j MDC class?  For those not familiar
with this class
-You put your contextual information in the MDC thread local hash map
-In the appender.layout.conversion format you specify the MDC keys where you
want the information inserted into the log entry.
-This is advantageous as it provides granular control over the format (not
all ESAPI users need all of the information being logged today)

Design:
-If we need to offer binary compatibility with the Java Logger, support both
implementations and use a configuration setting to determine whether MDC is
on. 

Original issue reported on code.google.com by manico.james@gmail.com on 11 Jan 2010 at 4:01