Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
since SLING-10391 the ESAPI outputs a bunch of log messages to stdout each times unit tests are run, example:
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!
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 old.
but there is a system property org.owasp.esapi.logSpecial.discard that prevents that console logging.
Attachments
Attachments
Issue Links
- relates to
-
SLING-10391 Improve MockXSSAPIImpl
- Closed
- links to
https://github.com/apache/sling-org-apache-sling-testing-sling-mock/commit/7a8706a9024dede95d94c9a348815863a120f048