Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-12002

sling-mock: Prevent StdOut logging from ESAPI

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • Testing Sling Mock 3.4.12
    • Testing
    • 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

        Issue Links

          Activity

            People

              sseifert Stefan Seifert
              sseifert Stefan Seifert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: