Running
Logging

Logging

Dolos outputs a LOT of logs through stdout. Internally, it uses a tracing mechanism that groups logs into hierarchical blocks called spans that holds data describing the context where the event (aka: log) ocurred.

Depending on your use-case, the amount and detail of this logs might be overwhelming. Dolos provides a set of configuration values that allows you to opt-in into different levels of detail.

Log Levels

Dolos follow a very common convention around log levels. These levels describe discrete categories of decreasing severity (broadly speaking).

The following table describes the available options and what they are used within our context:

leveldescription
errorunexpected errors, stuff that shouldn't occur
warnwarning about things that are expected but require attention
infonormal operation events that are relevant for day-to-day operations
debugnormal operation events with a level of detail useful for debugging problems
traceextreme level of detail, usually including data being processed

Sub-components

There are some sub-components within Dolos that are more verbose than others. Depending on your use-case or debugging needs, you might one to mute some components and not others.

We have identified a few components that make sense to isolate from the rest of the logs to provide extra flexibility. These components are:

componentdescription
PallasThe library that deals with low-level Ouroboros interactions (eg: mini-protocols, cbor decoding, etc)
TonicThe library that deals with gRPC communication

Configuration

Now that we understand the different dimensions involved in the logging process, we can describe the relevant configuration.

The configuration section within the dolos.toml file that controls the logging options is called logging (I know, impossible to guess). The schema for the configuration values is the following:

propertytypeexample
max_leveloptionerror / warn / info / debug / trace
include_pallasoptiontrue / false
include_tonicoptiontrue / false
  • max_level: the maximum severity level of events to include in the output. By selecting a specific level, you're effectively including that level and every other levels of higher severity.
  • include_pallas: a flag that indicate if the output should include logs from the Pallas sub-component.
  • include_tonic: a flag that indicate if the output should include logs from the Tonic sub-component.

The following is an example of a logging configuration:

[logging]
max_level = "INFO"
include_pallas = true
include_tonic = true

You can find more detailed info about configuration in the configuration schema section