All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gwizard.logging.LoggingConfig Maven / Gradle / Ivy

The newest version!
package org.gwizard.logging;

import ch.qos.logback.classic.Level;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 

Logging configuration is drawn from three sources, in three steps:

*
    *
  1. Logging configuraton starts with the standard Logback boostrap process (ie, logback.xml).
  2. *
  3. If the 'xml' attribute has any content here, the configuration is replaced wholesale.
  4. *
  5. Any 'loggers' mapped here have their levels overriden appropriately.
  6. *
* *

The optional 'xml' property should be the raw XML of the logback config file. It will * be fed directly to logback. This actually works pretty well in a YAML file because of the * nifty block text syntax.

* *

If the xml value is null or empty, we leave the standard Logback boostrap config alone.

*/ public interface LoggingConfig { /** Optional raw xml content for logback config that will replace any preexisting configuration */ default String getXml() { return null; } /** Override any logging levels specified in either the xml or in the logback bootstrap */ default Map getLoggers() { return new LinkedHashMap<>(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy