Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6222

Ability to shunt irrelevant and verbose logs in tests

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4
    • Component/s: testing
    • Labels:
      None
    • Magnolia Release:
      5.4

      Description

      In some tests, irrelevant loggers are pretty verbose. eg when using slf4j-simple and extending RepositoryTestCase, we get a ton of Jackrabbit logging that isn't necessarily helpful.
      In several tests of core, we already do this

      // Silence log4j completely
      org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
      

      or this

      // Silence log4j for a specific category
      org.apache.log4j.Logger.getLogger(org.apache.commons.digester.Digester.class).setLevel(org.apache.log4j.Level.OFF);
      

      This adds a simple method in TestUtil which does this for both log4j and slf4j-simple.

        Attachments

          Activity

            People

            Assignee:
            gjoseph Magnolia International
            Reporter:
            gjoseph Magnolia International
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: