-
-
Save RajatNair/1441436ea02d0ef2d66ed297cb7aa373 to your computer and use it in GitHub Desktop.
Enabling access log with Undertow on WildFly - https://mirocupak.com/logging-requests-with-undertow/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to Wildfly dump request body | |
# $WILDFLY_HOME/bin/jboss-cli.bat --connect --file=enable-request-dumping.cli | |
batch | |
/subsystem=undertow/configuration=filter/custom-filter=request-logging-filter:add(class-name=io.undertow.server.handlers.RequestDumpingHandler, module=io.undertow.core) | |
/subsystem=undertow/server=default-server/host=default-host/filter-ref=request-logging-filter:add | |
run-batch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To remove Access logging -
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:remove()
To remove Request dumping -
/subsystem=undertow/server=default-server/host=default-host/filter-ref=request-logging-filter:remove()