jboss-cli --gui controller=machine-name or ip:9990 --user=[wildfly user] --password=[password]
Run the command to create the access log:
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(pattern="%A%t%h%l%u%r%s%b%T%I", directory="${jboss.server.log.dir}", prefix=access, suffix=".log")
If you want to read log files remotely:
List log files:
/subsystem=logging/:list-log-files
Recover the entire log file (careful on the size):
/subsystem=logging/:read-log-file(name=server.log,lines=-1,skip=0)
Recover just the tail :
/subsystem=logging/:read-log-file(name=server.log,tail=true,lines=10,skip=0)
More can be found here:
http://www.mastertheboss.com/jboss-server/jboss-log/read-wildfly-8-log-files-using-the-cli

No comments:
Post a Comment