Search code examples
wildflylog-viewer

Wildfly Log Viewer has to show log4j logs


I am using WildFly9.0 and able to see the server.log in web console's Log Viewer page. My application has its own log files in the same folder with different names configured using log4j.

My question is how can i see those files also in web console's Log Viewer? How to configure them?


Solution

  • The web console uses the log-file resource under the logging subsystem. This only allows the files from the following handlers to be listed; file-handler, periodic-rotating-file-handler, periodic-size-rotating-file-handler and size-rotating-file-handler. Also note that if you use one of these handlers the relative-to attribute must be set to jboss.server.log.dir.

    There is no way to register additional files. The main reason for this was to not allow the server to become a raw file server. Plus there are security concerns around just allowing any file on the file system to be read/downloaded.