In the product overall, there seems to be some inconsistencies in how we case log messages. The different forms we find are • "ERROR: This failed" (e.g. tl-setup/tl-setup.py) • "Error: This failed" (e.g. tlclient/tlclient_session.cc) • "Error: this failed" (e.g. tlclient/tlclient_util.cc) Note that the strings above are examples. There might also be instances of complete lowercase, although none has been found at this point. Considering that the message after the category (e.g. "Error") is to be viewed as a new sentence, in combination with our preferred sentence casing (see bug 5114), it is probably the second style we should settle for. Used the following regex to find the different cases: git grep "['\"].*[A-Z,a-z]+*: [A-Z,a-z].*" ':!*.po' which can be narrowed down to one of the styles mentioned above by pruning the sets including lower and uppercase letters in the regex.
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.
Note that the tests from comment 2 was done on RHEL 9 with CUPS v. 2.3.3.