This may be a stupid question, but since it came to my mind, I am asking to see if this makes any sense.
- I have a project that runs on customer's machine.
- It is started via command-line and creates log inside a
logs
folder. The logging levels are set insidelog4j.xml
. The current statements I see areINFO
,DEBUG
andERROR
.
Requirement
- I am working on a feature where I am introducing TRACE
option.
- I do not want to log these statements by default (just log at the level of DEBUG
).
- But in case of any issues, I want to enable the TRACE
level (via some environment variable, system property) that my running application can pick and start logging the TRACE
statements as well
How can I achieve this?