Ihar Hancharenka 5dff80e88e first
2023-03-27 16:52:17 +03:00

16 строки
624 B
Plaintext

custom cfg
https://logging.apache.org/log4j/2.0/manual/customconfig.html
https://logging.apache.org/log4j/2.0/manual/extending.html#ConfigurationFactory
custom cfg factory
https://github.com/eugenp/tutorials/tree/master/logging-modules/log4j2
-Dlog4j2.configurationFactory=com.baeldung.log4j2.CustomConfigFactory
@Plugin(name = "CustomConfigurationFactory", category = ConfigurationFactory.CATEGORY)
@Order(50)
public class CustomConfigFactory extends ConfigurationFactory {
// ... rest of implementation
}
custom log levels
https://logging.apache.org/log4j/2.x/manual/customloglevels.html