eos

View on GitHub

Logging for nodeos is controlled by the logging.json file. CLI options can be passed to nodeos to setup logging.json. The logging configuration file can be used to define appenders and tie them to loggers and logging levels.

Appenders

The logging library built into EOSIO supports two appender types:

Console

This will output log messages to the screen. The configuration options are:

Example:

{
    "name": "consoleout",
    "type": "console",
    "args": {
    "stream": "std_out",

    "level_colors": [{
        "level": "debug",
        "color": "green"
        },{
        "level": "warn",
        "color": "brown"
        },{
        "level": "error",
        "color": "red"
        }
    ]
    },
    "enabled": true
}

GELF

This sends the log messages to Graylog. Graylog is a fully integrated platform for collecting, indexing, and analyzing log messages. The configuration options are:

Example:

{
    "name": "net",
    "type": "gelf",
    "args": {
        "endpoint": "104.198.210.18:12202”,
        "host": <YOURNAMEHERE IN QUOTES>
    },
    "enabled": true
}

Loggers

The logging library built into EOSIO currently supports five loggers:

The configuration options are:

Example:

{
    "name": "net_plugin_impl",
    "level": "debug",
    "enabled": true,
    "additivity": false,
    "appenders": [
        "net"
    ]
}

[[info]] | net_plugin_impl, bnet_plugin, producer_plugin, transaction_tracing are not enabled unless explicitly enabled in the logging.json