|
|
For consistent logging messages, following rules are used:
|
|
|
|
|
|
* message is not terminated by new line
|
|
|
* message is not terminated by dot
|
|
|
* messages starts with a lower-case letter, unless the first word is an upper-case word (AXFR, DNSSEC, etc.)
|
|
|
* parts of the message are separated by comma (not colon, semicolon, or dash)
|
|
|
* error string retrieved by `knot_strerror` or similar are appended at the end of the message and enclosed in parentheses
|
|
|
* full name of unit is used instead of an abbreviation (e.g. `seconds` not `s` or `sec`)
|
|
|
* brief message is better than a whole sentence
|
|
|
* delimit strings *from outside* properly (e.g. use `journal '%s', ...` or `journal, file %s, ...`, not `journal %s ...` for filename inclusion)
|
|
|
* proper category is used
|
|
|
* zone name is not included in log message, designated `log_zone_*` function is used instead
|
|
|
|
|
|
Logging interface:
|
|
|
|
|
|
* server events: log_fatal, log_error, log_warning, log_notice, log_info, log_debug
|
|
|
* zone events (domain name): log_zone_fatal, log_zone_error, log_zone_warning, log_zone_notice, log_zone_info, log_zone_debug
|
|
|
* zone events (ASCII name): log_zone_str_fatal, log_zone_str_error, log_zone_str_warning, log_zone_str_notice, log_zone_str_info, log_zone_str_debug |
|
|
\ No newline at end of file |