Documentation > Programming Guide > Configuring Crossbario Logging

Configuring Logging has configurable logging systems, to make its log output easier to consume or nicer to look at.

Formats has three log formats, specified by the --logformat switch.

  • colour: This is the default, and outputs coloured logging messages. Example
  • nocolour: This reduces the colour output by Crossbar, and is suitable for redirecting to files. Example
  • syslogd: This removes timestamps, and reduces the colour. Example

Levels supports restricting the output to certain levels, specified by the --loglevel switch. These levels are:

  • none: No output.
  • critical: Critical or above.
  • error: Error or above.
  • warn: Warning or above.
  • info: The default -- Info or above.
  • debug: Debug or above, and turn on the source location of the log events (what class/function generated them). Example
  • trace: Trace or above. Some internal components support trace logging, this is not yet extended to user components.

Logging to a file

By passing --logtofile to, you can log to the location specified by --logdir. You may combine the --loglevel switches with --logtofile, but not --logformat (it is always in nocolour).

Adding logging to your components

If you want to integrate with's logging system, see Logging in