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

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

There is a newer version: 1.1.6
Show newest version
package org.gwizard.logging;

import ch.qos.logback.classic.Level;
import lombok.Data;
import lombok.NoArgsConstructor;
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.

*/ @Data @NoArgsConstructor public class LoggingConfig { /** Optional raw xml content for logback config that will replace any preexisting configuration */ private String xml; /** Override any logging levels specified in either the xml or in the logback bootstrap */ private Map loggers = new LinkedHashMap<>(); /** Sometimes convenient */ public LoggingConfig(String xml) { this.xml = xml; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy