Hoy can I change the log4j level in WildFly server?

1
0
-1

I'm logging in a Groovy script using:

Logger logger = Logger.getLogger("org.bonitasoft");
logger.info("Test log");

It works fine in development environment, but in the production server I can´t see the logs in server.log file.

I tried modifying standalone.xml and logging.properties, but when I restart the server it changes again to 'WARN'.

Is it possible to do this or I should debug using the WARN level?

Thank you very much.

1 answer

1
0
-1

Which logging framework are you using? (i.e. Logger class is from which package?)

I configured a Groovy script connector with the following code:

import java.util.logging.Logger

Logger logger = Logger.getLogger("org.bonitasoft")

logger.warning("WARNING log")
logger.info("INFO log")

And then, with the WildFly server running I type the following command (on Linux, should be pretty much the same on Windows) to reconfigure the log:

  • cd server/bin
  • ./jboss-cli.sh --connect
  • /subsystem=logging/logger=org.bonitasoft:write-attribute(name=level,value=INFO)
  • quit

You can find more information about WildFly logging configuration in WildFly documentation: https://docs.jboss.org/author/display/WFLY10/Logging+Configuration#Loggi...

Notifications