WildFly CLI - Configuring Logging: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:
==Configure the Level==
==Configure the Level==


Navigate to the newly added logger:
From the same "directory"


  cd logger=<b>''new-logger''</b>
  ./logger=<b>''new-logger''</b>:write-attribute(name="level", value="<b>''level''</b>")  
:write-attribute(name="level", value="<b>''level''</b>")  


Example:
Example:


  cd logger=org.hornetq
  /logger=org.hornetq:write-attribute(name="level", value="TRACE")
:write-attribute(name="level", value="TRACE")


=Reconfiguring Logging to TRACE=
=Reconfiguring Logging to TRACE=

Revision as of 20:04, 20 July 2017

Internal

Configure a New Logger

Add the Logger

Navigate to the appropriate logging subystem ("/subsystem=logging" in standalone mode and "/profile=.../subsystem=logging" in domain mode.

./logger=new-logger:add

Example:

./logger=org.hornetq:add

Configure the Level

From the same "directory"

./logger=new-logger:write-attribute(name="level", value="level") 

Example:

/logger=org.hornetq:write-attribute(name="level", value="TRACE")

Reconfiguring Logging to TRACE

Enable CONSOLE logging

/subsystem=logging/console-handler=CONSOLE:add(level=INFO,formatter="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n")
/subsystem=logging/root-logger=ROOT:add-handler(name="CONSOLE")