service loglevel set

The service loglevel set command specifies the level of detail included in the service log.

You can specify the default logging level as well as logging levels for each service on your system. When you change logging levels the change will not be reflected in the log entries made before the change.

Usage

service loglevel set --s ServiceName --l LogLevel
RequiredArgumentDescription
Yes--s ServiceNameSpecifies the name of the service whose logging level you want to set.
Yes--l LogLevelSpecifies the logging level for the service, where LogLevel is one of the following:
Default
The service uses the system default logging level. You can set the system log level by using the systemloglevel set command.
Disabled
No event logging enabled.
Fatal
Minimal logging. Only fatal errors are logged. Fatal errors are those that make the system unusable.
Error
Errors and fatal errors are logged. Errors indicate an isolated problem that causes part of the system to become unusable. For example, a problem that causes a single service to not work would generate an error.
Warn
Event warnings, errors, and fatal errors are logged. Warnings indicate problems that do not stop the system from working. For example, when loading a service where a parameter has an invalid value, a warning is issued and the default parameter is used. During the use of a service, if results are returned but there is a problem, a warning will be logged.
Info
High-level system information is logged. This is the most detailed logging level suitable for production. Info events are typically seen during startup and initialization, providing information such as version information and which services were loaded.
Debug
A highly detailed level of logging, suitable for debugging problems with the system.
Trace
The most detailed level of logging, tracing program execution (method entry and exit). It provides detailed program flow information for debugging.

Each logging level includes the ones above it on the list. In other words, if Warning is selected as the logging level, errors and fatal errors will also be logged. If Info is selected, informational messages, warnings, errors, and fatal errors will be logged.

Note: Selecting the least severe and therefore most verbose logging level can affect system performance. We therefore recommend that you should select the most severe setting that meets your particular logging requirements.

Example

This example sets the logging level for ValidateAddress to Warn:

service loglevel set --s ValidateAddress --l Warn