Crossbar.io has configurable logging systems, to make it's log output easier to consume or nicer to look at.
Crossbar's structured logging system is present in versions 0.11 and above, and a lot of these options will only work in these versions.
Crossbar.io has three log formats, specified by the
color: This is the default, and outputs colored logging messages. Example
nocolor: This reduces the color output by Crossbar, and is suitable for redirecting to files. Example
syslogd: This removes timestamps, and reduces the color. Example
Crossbar.io supports restricting the output to certain levels, specified by the
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 Crossbar.io components support trace logging, this is not yet extended to user components.
Logging to a file¶
--logtofile to Crossbar.io, you can log to the location specified by
You may combine the
--loglevel switches with
--logtofile, but not
--logformat (it is always in
Adding logging to your components¶
If you want to integrate with Crossbar.io's logging system, see Logging in Crossbar.io.