Summary: | Inconsistent casing in log messages | ||
---|---|---|---|
Product: | ThinLinc | Reporter: | Tobias <tobfa> |
Component: | Other | Assignee: | Bugzilla mail exporter <bugzilla-qa> |
Status: | NEW --- | ||
Severity: | Normal | CC: | linma |
Priority: | P2 | ||
Version: | trunk | ||
Target Milestone: | LowPrio | ||
Hardware: | PC | ||
OS: | Unknown | ||
Acceptance Criteria: |
Description
Tobias
In cases where our module log to external services, we might want to keep the same formatting as the external code. One example of this is our printer code which logs to the CUPS log. In this case, CUPS treats the log message differently if it is prefixed with "ERROR" or "Error", and shows the message at different cupsd log level (for info on the different level, see [1] and go to "LogLevel") [1]: https://www.cups.org/doc/man-cupsd.conf.html Example message: "<prefix>: Bad input" If the prefix is "ERROR", the log line will be in red text, the prefix will be removed from the message and it will show up for cupsd log level "warn". If instead the prefix is "Error", the log line will be demoted to a debug log line (shown at the lower cupsd log level "debug") and the prefix will be included in the message. For prefixes "WARNING" and "INFO", all caps or sentence case does not make a difference. * Both variants of "WARNING" gets a yellow log line, prefix removed and shown at cupsd log level "warn" * Both variants of "INFO" is shown at cupsd log level "debug" Since CUPS treats the prefixes in different way, it was decided to keep all caps for our printer modules and revert commit r41327. Note that the tests from comment 2 was done on RHEL with CUPS v. 2.3.3. |