diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-02 16:58:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-02 16:58:25 +0100 |
commit | 8b06b8d37c60864fe6c2301c8c2dff29ad8d7ace (patch) | |
tree | ed29bde903772962377da82c7c71060bbc412e4e /doc | |
parent | 24bafd7640395e5d0df8e919771580b1755dec8e (diff) | |
download | rspamd-8b06b8d37c60864fe6c2301c8c2dff29ad8d7ace.tar.gz rspamd-8b06b8d37c60864fe6c2301c8c2dff29ad8d7ace.zip |
Update logger documentation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/markdown/configuration/logging.md | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/doc/markdown/configuration/logging.md b/doc/markdown/configuration/logging.md index 35f70f4e1..26dc7c785 100644 --- a/doc/markdown/configuration/logging.md +++ b/doc/markdown/configuration/logging.md @@ -13,15 +13,37 @@ Also it is possible to turn on debug messages for specific ip addresses. This ab #81123(fuzzy): May 11 19:41:54 rspamd file_log_function: Last message repeated 155 times #81123(fuzzy): May 11 19:41:54 rspamd process_write_command: fuzzy hash was successfully added +## Unique id + +From version 1.0, rspamd logs now contain unique id for each logging message. That allows to find the relevant messages quickly and filter everything else. Moreover, there is `module` definition now, for example `task` or `cfg` modules. Here is a quick example of how it works: let's imagine that we have an incoming task for some message. Then you'd see something like this in the logs: + + 2015-09-02 16:41:59 #45015(normal) <ed2abb>; task; accept_socket: accepted connection from ::1 port 52895 + 2015-09-02 16:41:59 #45015(normal) <ed2abb>; task; rspamd_message_parse: loaded message; id: <F66099EE-BCAB-4D4F-A4FC-7C15A6686397@FreeBSD.org>; queue-id: <undef> + +So the tag is `ed2abb` in this case. Afterwards, all processing related to this task will have the same tag. It includes not merely `task` module, but also other modules, such as `spf` or `lua` logger. +For other modules, such as `cfg` the tag is generated statically, using some specific characteristic, for example configuration file checksum. + ## Configuration parameters Here is summary of logging parameters: -* `type` - Defines logging type (file, console or syslog). For some types mandatory attribute is required: - - `filename` - path to log file for file logging - - `facility` - logging facility for syslog -* `level` - Defines loggging level (error, warning, info or debug). -* `log_buffer` - For file and console logging defines buffer size that will be used for logging output. -* `log_urls` - Flag that defines whether all urls in message would be logged. Useful for testing. -* `debug_ip` - List that contains ip addresses for which debugging would be turned on. -* `log_color` - Turn on coloring for log messages. Default: `no`. +- `type` - Defines logging type (file, console or syslog). For some types mandatory attribute is required: + + `filename` - path to log file for file logging + + `facility` - logging facility for syslog +- `level` - Defines loggging level (error, warning, info or debug). +- `log_buffer` - For file and console logging defines buffer size that will be used for logging output. +- `log_urls` - Flag that defines whether all urls in message would be logged. Useful for testing. +- `debug_ip` - List that contains ip addresses for which debugging would be turned on. +- `log_color` - Turn on coloring for log messages. Default: `no`. +- `debug_modules` - A list of modules that are enabled for debugging. Now the following modules are available here: + + `task` - task messages + + `cfg` - configuration messages + + `symcache` - messages from symbols cache + + `sqlite` - messages from sqlite backends + + `lua` - messages from lua code + + `spf` - messages from spf module + + `dkim` - messages from dkim module + + `main` - messages from the main process + + `dns` - messages from DNS resolver + + `map` - messages from maps in rspamd + + `logger` - messages from the logger itself |