Listing and reading log files

In this recipe, we will learn how to list and read log files. This can be helpful when you have access only to the CLI (which might be a remote one), and not to the server itself or the file system hosting the log files.

Getting ready

To fully understand this recipe, you should have followed one of the previous recipes, which have created the various log files. However, the standard WildFly log file server.log would be present and it's enough.

How to do it...

  1. With a running WildFly server, open your command-line tool and connect to the CLI:
    $ ./bin/jboss-cli.sh --connect
    [standalone@localhost:9990 /]
  2. Before reading a file, we need to know which log files are present. To list them all, execute the following commands:
    [standalone@localhost:9990 ...

Get WildFly Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.