My Oracle Support Banner

How to Enable Asynchronous Logging in the Glassfish Enterprise Server (Doc ID 1125713.1)

Last updated on OCTOBER 19, 2023

Applies to:

Oracle GlassFish Server - Version 2.1 and later
Information in this document applies to any platform.


The GlassFish Enterprise Server by default uses synchronous logging, where each log record is flushed to the instance's server.log as the log record is generated.  With high levels of logging, such as FINE, FINER, FINEST, the overhead involved with synchronous logging becomes more expensive. 

With Asynchronous logging, an in-memory log buffer is used to feed log records to the underlying file system logger by a separate logging thread.  From a functional point of view, the application server behaves the same as before, however less time is spent performing logging activities.

Asynchronous logging is not enabled by default. This feature is implemented in

It can be enabled by


Asynchronous logging for Access Log
This document only details the configuration changed needed to enable asynchronous logging for the server.log file.  For logging to the access log, the configuration of asynchronous logging is handled differently by setting logging property accessLogWriterInterval (default: off, unit: seconds) and the property accessLogBufferSize (default: 4K, unit: bytes) at the virtual-server property of the respective virtual server. Please refer to the Glassfish Virtual-server documentation for further details. By default, unless the above virtual-server properties are explicitly set, asynchronous logging for access log is not enable and logging to access log is synchronous.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.