Creating logging handler is easy in standalone mode through jboss-cli
:
/subsystem=logging/file-handler=fh1:add(level=INFO, file={"relative-to"=>"jboss.server.log.dir", "path"=>"my-log1.log"})
but when I try to do the same with domain controller then the add
option is missing:
/host=slave01/server=server-one/subsystem=logging/file-handler=fh1:add (hit tab)
I've tried to add the logging module to the slave01
host.xml
so I could add handlers to each host individually:
<extensions>
<!-- ... -->
<extension module="org.jboss.as.logging"/>
</extensions>
but this has of course failed:
IllegalStateException: WFLYCTL0385: An attempt was made to register
the non-host capable subsystem 'logging' from extension module
'org.jboss.as.logging' in the host model.
I'm assuming that editing the logging.properties
file is not the right way to go. So how can I do that in domain mode?