Stefan Seifert created SLING-12002:
--------------------------------------

             Summary: sling-mock: Prevent StdOut logging from ESAPI
                 Key: SLING-12002
                 URL: https://issues.apache.org/jira/browse/SLING-12002
             Project: Sling
          Issue Type: Improvement
          Components: Testing
            Reporter: Stefan Seifert
            Assignee: Stefan Seifert


since SLING-10391 the ESAPI outputs a bunch of log messages to stdout each 
times unit tests are run, example:

{noformat}
ESAPI: WARNING: System property [org.owasp.esapi.opsteam] is not set
ESAPI: WARNING: System property [org.owasp.esapi.devteam] is not set
ESAPI: Attempting to load ESAPI.properties via file I/O.
ESAPI: Attempting to load ESAPI.properties as resource file via file I/O.
ESAPI: Not found in 'org.owasp.esapi.resources' directory or file not readable: 
D:\Develop\github\wcm-io\io.wcm.samples\bundles\core\ESAPI.properties
ESAPI: Not found in SystemResource Directory/resourceDirectory: 
.esapi\ESAPI.properties
ESAPI: Not found in 'user.home' (C:\Users\stefan.seifert) directory: 
C:\Users\stefan.seifert\esapi\ESAPI.properties
ESAPI: Loading ESAPI.properties via file I/O failed. Exception was: 
java.io.FileNotFoundException
ESAPI: Attempting to load ESAPI.properties via the classpath.
ESAPI: SUCCESSFULLY LOADED ESAPI.properties via the CLASSPATH from '/ (root)' 
using current thread context class loader!
ESAPI: SecurityConfiguration for Validator.ConfigurationFile.MultiValued not 
found in ESAPI.properties. Using default: false
ESAPI: Attempting to load validation.properties via file I/O.
ESAPI: Attempting to load validation.properties as resource file via file I/O.
ESAPI: Not found in 'org.owasp.esapi.resources' directory or file not readable: 
D:\Develop\github\wcm-io\io.wcm.samples\bundles\core\validation.properties
ESAPI: Not found in SystemResource Directory/resourceDirectory: 
.esapi\validation.properties
ESAPI: Not found in 'user.home' (C:\Users\stefan.seifert) directory: 
C:\Users\stefan.seifert\esapi\validation.properties
ESAPI: Loading validation.properties via file I/O failed.
ESAPI: Attempting to load validation.properties via the classpath.
ESAPI: SUCCESSFULLY LOADED validation.properties via the CLASSPATH from '/ 
(root)' using current thread context class loader!
{noformat}

in https://github.com/ESAPI/esapi-java-legacy/issues/68 is a discussion of 
removing/improving this approach of console logging before the actual logging 
implementation/adapter is in place - but this issue is already quite out.

but there is a system property {{org.owasp.esapi.logSpecial.discard}} that 
prevents that console logging.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to