Application Log Files
Each Deephaven application process writes log files to disk. These log files contain general information, errors, and other application messages for each process. The log files are in plain text format and can be viewed or searched using standard text processing utilities.
Log file locations
By default, the most recent application log files for Deephaven processes can be found in the following location:
/var/log/deephaven/<Application Log Directory>/<Log Prefix>.log.current
where the Application Log Directory and Log Prefix are different for each application.
For example, to view the current log file for the Authentication Server:
cat /var/log/deephaven/authentication_server/AuthenticationServer.log.current
These log locations are defined by properties in Deephaven property files and can be changed. The root logging directory is defined by the logroot
property, which has the following default value:
logroot=/var/log/deephaven
Each process can define its own log directory, using the form logDir.<process name>=<log directory>
, and allowing the <logroot>
substitution to use the logroot
definition as a starting directory. For example, the following property defines the authentication server's log directory:
logDir.authentication_server=<logroot>/authentication_server
The following property defines a default log directory for process names which don't have their own definitions:
defaultLogDir=<logroot>/misc
The location can be changed by passing the logDir
parameter into the JVM when a process is started. For example, passing the following parameter to a process changes the application log file location to the defined value:
-DlogDir=/db/TempFiles/logs
Monitor application logs
A new log file is created every 15 minutes for each application. Every application also hard links a .current
file to the current log file. The initial log file has a timestamp matching the time the process is started. Subsequent log files have the 15-minute timestamp interval.
The actual log file name has a timestamp suffix. For example, the Authentication Server log files:
AuthenticationServer.log.2018-01-30-170000.000+0000
Over a one-hour period, the Authentication Server will create four log files:
AuthenticationServer.log.2018-01-30-170000.000+0000
AuthenticationServer.log.2018-01-30-171500.000+0000
AuthenticationServer.log.2018-01-30-173000.000+0000
AuthenticationServer.log.2018-01-30-174500.000+0000
Note
If a process crashes, its log file timestamp will not end with the 000+0000
suffix.
Common practice is to monitor the .current
log file with tail
. Be sure to use the -F
option to ensure retries when a new log file is created:
cd /var/log/deephaven/authentication_server
tail -F AuthenticationServer.log.current