The GlassFish Server produces writes log messages and exception stack trace output to the log file in the logs directory of the instance, appserver-root/domains/domain-name/logs. The volume of log activity can impact server performance; particularly in benchmarking situations.
In general, writing to the system log slows down performance slightly; and increased disk access (increasing the log level, decreasing the file rotation limit or time limit) also slows down the application.
Also, make sure that any custom log handler does not log to a slow device like a network file system since this can adversely affect performance.
Set the log level for the server and its subsystems in the GlassFish Server Administration Console. Navigate to the Configurations->configuration-name->Logger Settings page, and follow the instructions in the online help. Alternatively, you can configure logging by following the instructions in Chapter 7, Administering the Logging Service, in Oracle GlassFish Server 3.1 Administration Guide.