Logging

Application and Node logs are handled by a common log pipeline system with currently 2 outputs available:

Configuration

The logs system is configured in the node configuration:

"logging": {
    //Configures which outputs are enabled.
    "outputs": {
        "nlog": {
            "enabled": true
        },
        "elasticsearch": {
            "enabled": true
        }
    },
//Configures the minimal log level for node logs sent to the output.
"minLogLevel": "Trace",

/
"applications": {
    //Min logging level for applications. Trace, Debug, Info, Warn, Error, Fatal
    "minLogLevel": "Trace",

    //More specific min log level overrides can be specified per account or per app.
    "myAccount": {
        "minLogLevel": "Trace",
        "myApp": {
            "minLogLevel": "Trace"
        }
    }

    }

},

Stormancer.Logging.Nlog

Installation:

stormancer plugins add --id Stormancer.Logging.Nlog

Then enable the output in the node configuration (see config sample above)

Stormancer.Elasticsearch

This plugin pushes Node & App logs in an elasticsearch cluster configured Installation:

stormancer plugins add --id Stormancer.Elasticsearch

Then enable the output in the node configuration (see config sample above)

Configuration

The plugin Elasticsearch configuration is set in the node configuration file:

{
    //Elasticsearch DB connection config
    "elasticsearch": {
    "credentials": {
        "basic": {
        "login": "yyy",
        "password": "xxx"
        }
    },
    //Elasticsearch endpoint. Defaults to "http://localhost:9200"
    "endpoint": "http://{elasticHost}/"
},

Diagnostics

The cluster status API exposes diagnostics information, including the 32 last errors generated by the plugin.

GET: http://{adminWebApi}/_cluster/status {

“components”: {
“logs.elasticsearch”:{

errors: [

]

}

}

}