Glassfish Logs

Monitoring Glassfish logs with the help of Site24x7 AppLogs is smooth and efficient, as all the associated log data is retrieved and presented in one collective view. Glassfish log data is presented by splitting them into appropriate fields like date & time, product version, module, log level, key values, time mills, level value, source file name and message. Learn more about log management with Site24x7

Getting started

  1. Log in to your Site24x7 account.
  2. Download and install the Site24x7 Server Monitoring agent (Windows | Linux). 
  3. Go to Admin > AppLogs > Log Profile and Add Log Profile.

Logs file path

Each application writes logs in different folders and files. By default, Glassfish logs are sourced from the below mentioned folder path for the respective Operating System. If you have logs in different folder, you can mention it under the File Path to source them from that particular folder while creating a log profile.

Linux icon
Windows icon
C:\Program Files\glassfish*\domains\*\logs\server.log*

Log pattern

$DateTime:date$] [$ProductVersion$] [$LogLevel$] [$Module$] [$SourceFileName$] [$KeyValues$] [timeMillis: $TimeMills:number$] [levelValue: $LevelValue:number$] [[$Message$]]

This is the default pattern defined by Site24x7 for parsing Glassfish logs based on the sample mentioned below.

Sample log

[2017-01-09T13:30:13.278+0530] [glassfish 4.1] [INFO] [NCLS-JMX-00002] [javax.enterprise.system.jmx] [tid: _ThreadID=176 _ThreadName=Thread-37] [timeMillis: 1483948813278] [levelValue: 800] [[JMXStartupService: Stopped JMXConnectorServer: null]]

The above sample log can be separated into 9 fields, each of which will take its respective value from here and will then be uploaded to Site24x7.

Field name Field value
Date Time 2017-01-09T13:30:13.278+0530
Product Version glassfish 4.1
Log Level INFO
Module NCLS-JMX-00002
Source File Name javax.enterprise.system.jmx]
Key Values tid: _ThreadID=176 _ThreadName=Thread-37]
Time Mills timeMillis: 1483948813278
Level Value levelValue: 800
Message JMXStartupService: Stopped JMXConnectorServer: null

Related log types

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.