Skip to content

Instantly share code, notes, and snippets.

@mcupak
Last active March 10, 2020 15:56
Show Gist options
  • Save mcupak/4a276682a70295049b685ba292052974 to your computer and use it in GitHub Desktop.
Save mcupak/4a276682a70295049b685ba292052974 to your computer and use it in GitHub Desktop.
Enabling access log with Undertow on WildFly - https://mirocupak.com/logging-requests-with-undertow/
# Script for enabling access log based on Undertow on WildFly.
# Run with: $WILDFLY_HOME/bin/jboss-cli.sh --connect --file=enable-access-log.cli
batch
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(pattern="%h %t \"%r\" %s \"%{i,User-Agent}\"",use-server-log=true)
run-batch
@ophers
Copy link

ophers commented Mar 10, 2020

Thanks. This was useful.
How would I similarly stop the access.log?

@mcupak
Copy link
Author

mcupak commented Mar 10, 2020

This would be the reverse operation: /subsystem=undertow/server=default-server/host=default-host/setting=access-log:remove()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment