Default Logging

Logging generated by default by the NuoDB processes is termed default logging.

Logging is one of the many database options you can specify when creating or updating your database, or when invoking new database engine processes (TEs or SMs).

Default logging was previously known as static logging.

You can choose to log to any or all of the following:

  • Local syslog (Unix only).

  • A remote syslog, for centralized logging or integration with third-party log managers.

  • To stdout, which is captured in the nuoadmin log (this is the default). See NuoDB Admin Log Description for information about where the nuoadmin log is stored on your platform.

Configure logging by setting one or more of the following Database Options. You must also specify at least one logging level and/or logging category to log (see Logging Options).

Table 1. Logging Destinations
Database Option to Enable Logging Logs To

verbose log-options

NuoDB Admin log file (nuoadmin.log).

syslog log-options

System log file (Unix only).

remote-syslog log-options

Syslog on the host specified by the remote-syslog-server database option. You must specify both remote-syslog and remote-syslog-server options to send logging information to the syslog on the remote host. Many third-party logging products can import logs sent in syslog format.

By default, only verbose logging to nuoadmin.log is enabled by NUODB_HOME/etc/nuodb.conf in your installation - see Database Configuration File for details of this file. Both syslog and remote-syslog are disabled by default.

Whatever you specify completely overrides any default or previous value, so it is usual to include error and warn levels (the defaults) when setting verbose.

Database Logging Options

Default logging options are typically specified when creating the database.

In the example below:

  • We want errors, warnings and transaction logging to be sent to nuoadmin.log.

  • We also set up remote logging to a syslog server enabling errors, warnings and SQL statement logging.

nuocmd create database --db-name test --default-options verbose error,warn,tx \
          remote-syslog error,warn,sql-statements remote-syslog-server <host:port>
Logging levels and categories must be supplied as a comma-separated list with no spaces.

Modify Database Logging Options

Once the database has been created, you can use nuocmd update database-options to change settings for new database processes, including logging. This replaces completely any previous setting.

For example, the following command causes new database processes to receive the verbose msgs,error option when they are started. (If the previous value was the default setting verbose error,warn, then warn logging is no longer enabled but process message logging now is).

nuocmd update database-options --db-name DBNAME --default-options verbose msgs,error
This configuration change does not affect running database process. In order for the change to take effect, existing database processes would have to be stopped and new processes started in their place. Assuming you have more than one TE and SM running, you can do this without taking the database down.

Process Logging Options

Logging can be enabled specifically for a new engine process when it is started. However, the settings will only apply to that process while it is running. You might do this during testing and then use a load-balancing rule to direct connections to that process using its start-id.

nuocmd start process --db-name DBNAME --options verbose error,warn,sql-statement-explain-plans

To enable logging without starting or restarting processes, consider Dynamic or On-Demand Logging instead.

For more details refer to Logging Options.