wildfly/wildfly — pull request #5156 by jamezp (2013-09-27 00:49:52+00:00)
Title: [WFLY-280] Add operation to list log files that are in the jboss.server.log.dir. Add an operation to read these files.

Adds two new operations; ```list-log-files``` and ```read-log-file```.

The ```list-log-files``` lists all files in the ```jboss.server.log.dir```. This does use the ```File.canRead()``` as partial way to secure files that should not be exposed via read. I did open a discussion on the ML about this and didn't hear much concern except for my initial concern about list files.

The ```read-log-file``` does just as it says and reads a log file. There are 5 options for this option;

* ```name``` (required): the name of the log file to read
* ```encoding```: the encoding for the log file
* ```lines```: the number of lines to read, defaults to 10
* ```skip```: the number of lines to skip before adding the results
* ```tail```: true to read from the bottom up, default is true