Advanced logging configuration

If you want ultimate control over where log messages go, you can use this rule-based config format for logging. For most cases you will only need the simple logging formats.

This advanced format allows you give Prosody a list of logging destinations (console, file, syslog, etc.) and specify which messages should go to that destination. An example is worth a thousand words, so here is the default logging Prosody uses if you don't specify one in the config:

That's right… one rule, it matches all messages and sends them to the 'console' sink.

So here's a better one, which is similar to the split logging output:

These rules have something new… a 'levels' option. To this you can provide a min/max level, or a list of levels, or a single level.

Here are some examples:

If any 'levels' specification is omitted then the rule will match messages from all levels.

You may build your own timestamp format, for example: