[Esapi-user] Console Logging

Springett Steven sspringett at us.axway.com
Fri Dec 3 11:49:36 EST 2010


I'm having an issue with logging in esapi.

When my application is starting up, it initializes it's logging and does other things, then it loads esapi. The esapi logger is not initialized yet so it dumps a bunch of logging messages to System.out via the logSpecial() method.

What I would like is a way to configure esapi to disable console logging or to redirect console logging to another type of object which then could be used by my application that already has it's loggings system initialized.

This is the issue that I'm currently having. My server is a console-based app. Startup should look like this:


MyApp Service Starting
  License successfully validated
  Loading database schemas
    Database schema being created or updated for MyApp
  Finished loading database schemas
MyApp Service Started

Instead, it looks like this:

MyApp Service Starting
  License successfully validated
  Loading database schemas
    Database schema being created or updated for MyApp
  Finished loading database schemas
Attempting to load ESAPI.properties via file io.
Attempting to load ESAPI.properties via file io.
Found in 'org.owasp.esapi.resources' directory: C:\MyApp\conf\esapi\ESAPI.properties
Loaded 'ESAPI.properties' properties file
Attempting to load validation.properties via file io.
Attempting to load validation.properties via file io.
Found in 'org.owasp.esapi.resources' directory: C:\MyApp\conf\esapi\validation.properties
Loaded 'validation.properties' properties file
MyApp Service Started


Redirecting System.out and System.err to log4j (what my app uses) prior to esapi loading solves this issue, the problem then is that the last line "MyApp Service Started" never appears, which is critical.

--Steve 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/esapi-user/attachments/20101203/2c182a1a/attachment.html 


More information about the Esapi-user mailing list