WildFly CLI - Configuring Logging: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 3: Line 3:
* [[WildFly CLI Operations#Subjects|CLI Operations]]
* [[WildFly CLI Operations#Subjects|CLI Operations]]


=Organizatorium=
=Configure a New Logger=


<font color=red>
==Add the Logger==


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


<pre>
./logger=''new-logger'':add
/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")
</pre>


Example:


</font>
./logger=org.hornetq:add
==Configure the Level==
 
Navigate to the newly added logger:
 
cd logger=''new-logger''
 
Example:
 
cd logger=org.hornetq
 
=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")

Revision as of 19:58, 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

Navigate to the newly added logger:

cd logger=new-logger

Example:

cd logger=org.hornetq

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")