Flowee the Hub documentation

Configuration: logs.conf

Logging configuration is needed when some part of the software needs to be more loud (or quiet) than the default.

The logs are configured in the logs.conf configure file, typically stored in /etc/flowee/logs.conf when you run from systemd. The format of this file is explained here.

Example file:

channel console
    option timestamp time millisecond
channel file
    option timestamp time

2004 info # NWM

channels

There are two types of channels console and file. Each can receive a number of different options.

channel console
  option timestamp time

channel file
  option timestamp time millisecond
  option path /var/log/flowee/

The usage of the ‘channel’ keyword implies you enable that channel, if you have no channels your logs will go nowhere!

You can configure each channel with a number of options. In the example the console will not have any timestamps, while the file output will list time without dates, showing millisecond if needed.

The options are:

option timestamp
Configure timestamps. The arguments are any combination of date, time and millisecond. No argument means you turn off timestamps.
Default is time millisecond for the console channel, the file channel defaults to date time millisecond.
option path [filepath]
This allows configuration of the file that the log goes to. Only used by the file channel.
Default: [datadir]/hub.log
option linenumber true
Development builds only. Prefix output with the linenumber of the source file. This only works for debug builds as other builds do not embed this info.
Default: off
option methodname true
Development builds only. Prefix output with the methodname. This only works for debug builds as other builds do not embed this info.
Default: true
option filename true
Development builds only. Prefix output with the filename of the source file. This only works for debug builds as other builds do not embed this info.
Default: false

Log sections and levels

It is possible to specify a per-section log-level. Default log-level is “WARNING”.

Example:

ALL quiet
1001 silent

Log sections are numbered and fully documented in their own page.
Log levels are named, full details in their own page.

For convenience of configuration the sections are sub-divided into groups. Each group being a multiple of 1000.

2000 info # networking
2001 silent

In the above example we set the group networking to show all messages. Because this is a group this will affect all network sections. 2000 - 2999. You can still override individual sections afterwards.

Reloading of config file

On Unix systems you can change the logs.conf file and then send the unix signal SIGHUP to trigger the re-parsing of the configuration file.

This signal will also cause the log file to be closed and re-opened, which is useful for log-rotation.