solo turn created LOG4J2-3061:
---------------------------------
Summary: document programmatically changing log settings
Key: LOG4J2-3061
URL: https://issues.apache.org/jira/browse/LOG4J2-3061
Project: Log4j 2
Issue Type: Bug
Components: Appenders, Configuration, Documentation
Affects Versions: 2.15.0
Reporter: solo turn
i was looking for a way to reconfigure the log of a high traffic web
application via GUI or API. the application writes its log via log4j2 2.14.1 to
stdout, and optionally into a file, rolling. the following i tried to do
programmatically:
# change the log level, e.g. from ERROR to DEBUG.
# switch between writing to a log file, or not.
# save the current settings into a config file so next time the application
comes up the settings still are active.
# reset to the factory settings.
if somebody knowledgeable could amend the documentation with how log4j2
supports to set a single value to a different value at runtime. add/remove
parts of the configuration, reset all of the configuration to the factory
settings would be helpful. maybe just add an overview glue, if the details are
already there. the page i found was:
[https://logging.apache.org/log4j/2.x/manual/customconfig.html]
deprecated is the following method mentioned:
Appender appender = FileAppender.createAppender("target/test.log", "false",
"false", "File", "true","false", "false", "4000", layout, null, "false", null,
config);
--
This message was sent by Atlassian Jira
(v8.3.4#803005)