This content has been marked as final.
Show 1 reply
-
1. Re: Logging to mulitiple files with slf4j and jboss logging in eap 6.3
jamezp Oct 7, 2014 6:47 PM (in response to hundleb)You just need to define a logger in the logging subsystem and assign your handler to it. Let's assume you're class is named com.example.MyClass. You can define either a logger called com.example or com.example.MyClass. Defining it as com.example is generally the best approach unless you want that specific logger to go it it's own file.
CLI Example:
/subsystem=logging/logger=com.example:add(handlers=[FILE2])
If you want com.example to only log to the FILE2 handler and not the CONSOLE or FILE handlers, then add the use-parent-handlers=false attribute.
/subsystem=logging/logger=com.example:add(handlers=[FILE2], use-parent-handlers=false)
--
James R. Perkins