I cannot set DEBUG logging level for my JBoss EAP; web console needs passwords so I try to set environment variables. But this error appears:
11:58:38,048 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
11:58:38,072 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.3.12.Final-redhat-2
2023-01-02 11:58:38,088 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) - JBAS014612: Operation ("add") failed - address: ([ ("subsystem" => "logging"), ("logger" => "com.example") ]) - failure description: "JBAS011539: Log level DEBUG# Secrets is invalid."
2023-01-02 11:58:38,089 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) - JBAS014612: Operation ("add") failed - address: ([ ("subsystem" => "logging"), ("logger" => "com.example") ]) - failure description: "JBAS011539: Log level DEBUG# Secrets is invalid."
I set env var, because standalone.xml uses it.
$ docker exec -i 53 grep "example" /opt/data/fuse/standalone/configuration/standalone.xml
<logger category="com.example">
<level name="${app.logging.loggers.example.level:INFO}"/>
I set it in docker-compose file
environment:
APP_LOGGING_LOGGERS_EXAMPLE_LEVEL=DEBUG
So, what is the problem here? Thanks.
I have found out why. Other scripts are doing echo into the properties files like
echo '# Secrets ' >> xxxxand then, find some secret and also echo after that line. And because no secret is found, this# Secretsbecomes the last line of my properties file. And then it is interpreted as logging level. And after changing the script of echo, it is working and no more errors.Besides I have found out the password and username of JBoss EAP Management console, so I can change logging level there. Please see here to learn how to do it properly.