mway08 / owasp-esapi-java

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

Cannot configure per-class or per-package log levels with Log4j Logger #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In log4j.properties you can specify a root log level like this:

log4j.rootLogger=error, R

Then you can specify per package and per-class log levels like this:

log4j.logger.com.mycompany.mypackage=info, R
log4j.logger.com.mycompany.mypackage.MyClass=debug, R

I have not been able to get this to work using the ESAPI Logger. 

Original issue reported on code.google.com by augu...@gmail.com on 19 Oct 2010 at 1:10

GoogleCodeExporter commented 9 years ago
Proposed patch attached, including tests. 

Original comment by augu...@gmail.com on 19 Oct 2010 at 2:57

Attachments:

GoogleCodeExporter commented 9 years ago
Checked in proposed patch as revision #1620. Added/modified/deleted files: 

configuration/log4j.xml
src/main/java/org/owasp/esapi/Logger.java
src/main/java/org/owasp/esapi/reference/ExampleExtendedLog4JLogFactory.java
src/main/java/org/owasp/esapi/reference/Log4JLogFactory.java
src/main/java/org/owasp/esapi/reference/Log4JLogger.java
src/main/java/org/owasp/esapi/reference/Log4JLoggerFactory.java
src/test/java/org/owasp/esapi/reference/Log4JLoggerTest.java
src/test/java/org/owasp/esapi/reference/TestDebug.java
src/test/java/org/owasp/esapi/reference/TestError.java
src/test/java/org/owasp/esapi/reference/TestFatal.java
src/test/java/org/owasp/esapi/reference/TestInfo.java
src/test/java/org/owasp/esapi/reference/TestTrace.java
src/test/java/org/owasp/esapi/reference/TestUnspecified.java
src/test/java/org/owasp/esapi/reference/TestWarning.java
src/test/resources/log4j.xml

Original comment by augu...@gmail.com on 20 Oct 2010 at 11:56