Bug 7606 - Cheetah errors can screw up logging
Summary: Cheetah errors can screw up logging
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Misc (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
Depends on:
Reported: 2020-12-09 12:42 CET by Pierre Ossman
Modified: 2024-03-19 14:16 CET (History)
0 users

See Also:
Acceptance Criteria:


Description Pierre Ossman cendio 2020-12-09 12:42:47 CET
In some error conditions Cheetah will make use of Python's logging module to give details about the issue. However this screws up our usage of the logging module and causes bad output at this point forward.

The visible result is double log lines with some bad formatting:

> 2020-12-09 08:19:05 INFO tlwebadm[8153]: [::ffff:] 'POST /health/home HTTP/1.1' 200 -
> INFO:tlwebadm:[::ffff:] 'POST /health/home HTTP/1.1' 200 -

What happens is that when Cheetah tries to log, it does so with the root logging object. ThinLinc never configure any output handlers on this root node, so when Cheetah makes use of it some default output handlers are configured. Later when we log through our normal sub-node, the default handler (that has just been added) of the root also gets called.

This happens in two places in Cheetah:

 * When you try to give a search list to Template with reserved variable names

 * When Cheetah gets a Unicode error generating text from the Template

In the latter case it's just a debug() output, so normally nothing is logged. But the mere call to debug() is enough to trigger the bug and ruin subsequent logging.

Seen whilst testing bug 7602 where non-ASCII usernames somehow triggers the Unicode problem.

Note You need to log in before you can comment on or make changes to this bug.