/opt/gpudb/core/logs/gpudb.log. This log file can be configured to use a
custom format that conforms to a rolling logging standard, enable various
appenders and/or loggers, change the logging level, and more using the
/opt/gpudb/core/etc/gpudb_logger.conf file.
Customizing the Log
-
Review the available Log Levels.
OFFFATALERRORWARNUERRINFODEBUGTRACENOTSET
-
Review the available Appenders.
ToConsoleToSysLogToFileToRollingFileToRollingDatedFileToBacktraceFile
- Review the available Loggers.
-
Open
/opt/gpudb/core/etc/gpudb_logger.confwith a text editor. -
Update the
rootLoggersetting with the desired level and appender(s): -
Uncomment the desired appender setting section(s):
- Adjust the appender settings as necessary, e.g., log size, threshold, file name, etc.
-
Adjust additional logger levels and/or appender(s) as necessary:
- Save and exit the file.
-
Restart the host manager and the database:
Log Levels
Log levels can be attributed to therootLogger (the base logger, default
level is INFO), the individual loggers at the bottom of the file, or as the
threshold for an appender. The log levels can be ranked in order from least
information to most information logged like so: OFF, FATAL, ERROR,
WARN, UERR, INFO, DEBUG, TRACE. Some loggers will not
provide their information unless a certain level is set.
Some loggers may have chained sub loggers; these sub
loggers will use the same level as the next logger up the chain (if set). If
none of the loggers or sub loggers in the chain are set, the logger will use the
rootLogger level. For example, if the following sub logger is NOTSET:
Appenders
The gpudb_logger.conf file comes with preconfigured appenders that can be used to create different log types. Multiple appenders can be used if necessary as long as the appropriate settings are uncommented and the appender name is added to therootLogger appender list. Default database setups have
the ToConsole appender enabled.
For sizing considerations, a request typically logs for about
500 bytes, but joins and multi-step
queries will log quite a bit more.
ToConsole
The Console appender pipes the output of the/opt/gpudb/core/bin/gpudb
script to a /opt/gpudb/core/logs/gpudb-<hostname>-<date>.log file. This
file is symbolically linked to /opt/gpudb/core/logs/gpudb.log.
ToSysLog
The SysLog appender sends the log output to the centralized SysLog host.ToFile
The File appender sends each Kinetica process’ (rank and host manager) logs to a separate file.This appender is demanding in terms of disk space.
ToRollingFile
The Rolling File appender processes logs to a rolling log file where a new log file is created once the previous log file reaches the maximum file size. The maximum file size and number of files to keep is configurable.ToRollingDatedFile
The Rolling Dated File appender processes logs to a dated rolling log file where a new log file is created (with the time the file is created appended to the name) once the previous log file reaches the maximum file size. The maximum file size and number of files to keep is configurable.ToBacktraceFile
The Backtrace File appender redirects the backtrace logs generated by theErrorBacktrace logger so they do not appear in the rootLogger output.
Add the ERROR log level and the ToBacktraceFile appender to the
ErrorBacktrace like so to properly setup this appender:
It’s advised that this appender also be added to the
rootLogger so that logs with a threshold of ERROR are
also logged to give context to a backtrace.Loggers
Loggers control specific types of information. Each logger can have its own log level and appender. If the level or appender are not specified, therootLogger level and/or appender(s) are
used.
Loggers are divided into sections:
- System and process information — memory, CPU
- GlobalManager and GlobalRegistry — publish and subscribe sockets
- All ranks (not exclusive to a particular rank) — filter planner, job manager, security manager
- Head node — endpoint manager, graph client, WMS
- Worker nodes — bytes and GPU manager, queue, tasks
Auditing
The location of the request auditor logs can also be controlled via the gpudb_logger.conf file. Auditing must be enabled before the logging can be configured; see Auditing for more information. The auditor uses its own appender to separate audit messages from other log messages. All audit messages are at theINFO or ERROR
level; it’s recommended the audit log level be kept to at
least INFO. If desired, the auditor can use a different appender.
The audit log comes with a few preconfigured
appender types that are similar to the rootLogger
appenders.
Customizing the Log
-
Review the available Log Levels.
OFFFATALERRORWARNUERRINFODEBUGTRACENOTSET
-
Review the available Appenders.
ToConsoleToSysLogToFileToRollingFileToRollingDatedFileToBacktraceFile
-
Open
/opt/gpudb/core/etc/gpudb_logger.confwith a text editor. -
Adjust the default
logger.Auditsetting as necessary: -
Optionally, update the
additivitysetting if audit information is desired in both therootLoggerand the audit log. In most cases, this will not need to be updated. - Optionally, uncomment one of the other audit appenders (File or Rolling File). If uncommenting a new appender, the Console appender will need to be commented out.
- Adjust the appender settings as necessary, e.g., log size, threshold, file name, etc.
- Save and exit the file.
-
Restart the host manager and the database:
Audit Appenders
Console
The Console appender for the audit log will direct output to therootLogger
file(s).