NuoDB Admin Logging

NuoDB Admin logging is configured in nuoadmin.conf file. This configuration does not limit or filter logs from the engines in any way. It only affects the amount of logging performed by nuoadmin itself.

The root logging level is controlled by logging.defaultLogLevel parameter (by default info) and provides a default for all loggers not explicitly configured. Increasing verbosity of non-root loggers (loggers for individual components/classes in the system) is done by specifying individual loggers and their corresponding log level via logging.logLevels parameter (see Adjusting Logging Output).

Applying the changes of the above parameters requires NuoDB Admin Process restart.

The available logging levels in descending order of verbosity are: all, trace, debug, info, warn, error and off.

Table 1. AP Logging Levels
Level Description

all

All log messages.

trace

Designates fine-grained informational events that are most useful for low-level debugging purposes.

debug

Designates fine-grained informational events that are most useful for debug purposes.

info

Designates informational messages that highlight the progress of the application at a coarse-grained level.

warn

Designates potentially harmful situations.

error

Designates error events that might still allow the application to continue running.

off

The highest possible rank and is intended to turn off logging.

When an error level is specified, all levels below are also enabled. For example, "logging.defaultLogLevel": "info" enables info logging plus warnings and errors. This is in contrast to setting logging levels for default or on-demand logging (where all desired logging levels must be explicitly listed).

During normal operations, there is no need to change the default NuoDB Admin logging level.

Adjusting Logging Output

However, logging can be adjusted using logging.logLevels, as shown in the following examples. Since nuoadmin.conf uses JSON format, multiple logging options can be specified as comma separated values between the curly brackets.

Suppose you see this output in the NuoDB Admin log:

2021-06-03T09:25:46.723-0400 INFO  [nuoadmin-0:main] AgentMain Starting NuoAdmin version=4.3.dev-9999
2021-06-03T09:25:46.729-0400 INFO  [nuoadmin-0:main] NThriftServer Listening on adminBindAddress=null, adminPort=48005, ssl=true
2021-06-03T09:25:46.730-0400 INFO  [nuoadmin-0:main] Server Started process management server on agentPort=48004
2021-06-03T09:25:46.731-0400 INFO  [nuoadmin-0:main] PingServer peer=nuoadmin-0 addr=lmac-asz6-2dsa:48005 ipAddress=192.168.0.40: starting ping in 5000ms
2021-06-03T09:25:46.859-0400 INFO  [nuoadmin-0:main] org.hibernate.validator.internal.util.Version HV000001: Hibernate Validator 3.0

You can control logging by specifying the name of the component doing the logging. In this example the components (classes) are AgentMain, NThriftServer, Server, PingServer and org.hibernate.validator.internal.util.Version.

In nuoadmin,conf, you might add configuration, like this to reduce logging by the AgentMain and Validator (this is an example and not a recommendation):

  "logging.logLevels": {
    "AgentMain": "warn",
    "org.hibernate.validator.internal.util.Version": "warn"
    ...
  },
  ...

Note that NuoDB classes (such as AgentMain) do not require the fully qualified name, the classname is sufficient, whereas the Hibernate class does.

Reducing logging by nuoadmin is generally not recommended as NuoDB support typically expects to analyse these logs to resolve cases.

Example 1

To eliminate repetitive INFO logging, which can obscure pertinent information in the log file, apply the following type of configuration construct in nuoadmin.conf. In this example we switch off "Request Log" logging (of HTTP REST requests, such as those generated by nuocmd). As the embedded Jetty HTTP Server is a third-party library, the fully qualified class name of the RequestLog component is required to reference it.

...
"logging.logLevels": {"org.eclipse.jetty.server.RequestLog": "OFF"},
...

Example 2

In rare situations, and when instructed by NuoDB Support, more verbose logging for non-root loggers can be configured. For example, to set the logging level for com.nuodb.nagent.ping.service.PingServer component logger to debug, apply the following configuration in nuoadmin.conf:

...
"logging.logLevels": {"PingServer": "debug"},
...

PingServer is a NuoDB class, so it can be used directly (a fully qualified name is not required). This will emit logging messages to the nuoadmin.log file.

...
2021-03-05T14:28:45.835+0000 INFO  [nuoadmin1:nuoadmin1-pingExecutor1-2] PingServer peer=nuoadmin3 addr=nuoadmin3:48005 ipAddress=172.19.0.4: Connected
2021-03-05T14:28:45.835+0000 INFO  [nuoadmin1:nuoadmin1-pingExecutor1-2] PingServer peer=nuoadmin3 addr=nuoadmin3:48005 ipAddress=172.19.0.4: Connected
2021-03-05T14:28:47.024+0000 DEBUG [nuoadmin1:nthriftserver-port48005-33-2] PingServer Peer nuoadmin2 has matching storage passwords
2021-03-05T14:28:47.024+0000 DEBUG [nuoadmin1:nthriftserver-port48005-33-2] PingServer Peer nuoadmin2 has matching storage passwords
2021-03-05T14:28:47.029+0000 DEBUG [nuoadmin1:nthriftserver-port48005-33-3] PingServer Peer nuoadmin3 has matching storage passwords
2021-03-05T14:28:47.029+0000 DEBUG [nuoadmin1:nthriftserver-port48005-33-3] PingServer Peer nuoadmin3 has matching storage passwords
2021-03-05T14:28:47.511+0000 DEBUG [nuoadmin1:nuoadmin1-pingExecutor1-1] PingServer PH [Peer [serverId=nuoadmin3, th=TH [nuoadmin3:48005]]]: 5.5111 ms
2021-03-05T14:28:47.512+0000 DEBUG [nuoadmin1:nuoadmin1-pingExecutor1-8] PingServer PH [Peer [serverId=nuoadmin2, th=TH [nuoadmin2:48005]]]: 6.1632 ms
2021-03-05T14:28:47.511+0000 DEBUG [nuoadmin1:nuoadmin1-pingExecutor1-1] PingServer PH [Peer [serverId=nuoadmin3, th=TH [nuoadmin3:48005]]]: 5.5111 ms
2021-03-05T14:28:47.512+0000 DEBUG [nuoadmin1:nuoadmin1-pingExecutor1-8] PingServer PH [Peer [serverId=nuoadmin2, th=TH [nuoadmin2:48005]]]: 6.1632 ms
2021-03-05T14:28:47.513+0000 DEBUG [nuoadmin1:nuoadmin1-pingExecutor1-3] PingServer PH [Peer [serverId=nuoadmin1, th=TH [nuoadmin1:48005]]]: 7.4627 ms (SELF)
2021-03-05T14:28:47.513+0000 DEBUG [nuoadmin1:nuoadmin1-pingExecutor1-3] PingServer PH [Peer [serverId=nuoadmin1, th=TH [nuoadmin1:48005]]]: 7.4627 ms (SELF)
...
Increasing logging levels will typically cause the log file size to increase faster. Ensure that there is enough disk space in the $NUODB_LOGDIR directory.