Reading logs with management interfaces
Log files can also be read or downloaded with the management interfaces of the application server. This is quite useful if you don't have an operating system account for inspecting your log files.
You have multiple options for reading logs with management interfaces. We will show at first how to do it with the CLI; next, we will use the REST services of the administration console to read it from a common browser.
Reading logs from the CLI
The logging subsystem includes a log-file resource that can be used to read the list of log files that have been created:
/subsystem=logging:read-children-names(child-type=log-file) { "outcome" => "success", "result" => [ "server.log", "server.log.2015-02-12", "server.log.2015-02-13" ] }
If you want to inspect a single log file, then you can use the read-log-file
operation which is available on each log-file
resource:
/subsystem...