Configuring The Access Log

Payara Micro supports a number of commands to help you configure access logging. It is easiest to configure access logging before it is bootstrapped, however you can edit domain.xml also, as Payara Micro can reload that dynamically.

Configuration Option Description Default Value

--accesslog <directory-path>

Sets user defined directory path for the access log


Sets user defined log format for the access log %auth-user-name% %datetime% %request% %status% %response.length%


Sets user defined access log write interval



Sets user defined simple date time suffix for access log filenames



Sets user defined prefix for access log filenames

All options available for configuring Payara Micro can be seen by running the JAR with the --help option, or by consulting Payara Micro Command Line Options

Usage Examples

Configuration Option Usage Result


java -jar payara-micro --accesslog ~/logs/accesslogs

Access logging is enabled


java -jar payara-micro --accesslog ~/logs/accesslogs --accesslogformat %u %t %s %b

Payara [22/11/2019:09:24:36 00] 200 532


java -jar payara-micro --accesslog ~/logs/accesslogs --accessloginterval 0

Access log write interval is set to write its buffer to file immediately


java -jar payara-micro --accesslog ~/logs/accesslogs --accesslogsuffix %hh%mm%a



java -jar payara-micro --accesslog ~/logs/accesslogs --accesslogprefix Production