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
- Log in to your Site24x7 account.
- Download and install the Site24x7 Server Monitoring agent (Windows | Linux).
- 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.
Log pattern
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 |