Status: Accepted
Owner: ----
Labels: Priority-High Type-Defect Target-2.6.2

New issue 950 by pekka.klarck: XML output can corrupt if library uses Python's `logging` module in threads
http://code.google.com/p/robotframework/issues/detail?id=950

A strange problem related to XML output being broken when using SSHLibrary was reported on robotframework-users:
http://groups.google.com/group/robotframework-users/browse_thread/thread/7a9008f7f4fa7e79

After some investigation I noticed that the problem is caused by:
1) SSHLibrary using Paramiko tool internally on Python,
2) Paramiko using Python's `logging` module internally in threads,
3) Robot Framework 2.6 automatically collecting messages logged by `logging` into its log file (issue 455),
4) Logging in threads easily causing problems (see e.g. issue 893).

The same problem can occur with any library that uses `logging` in threads either directly or indirectly by the tool it uses. This is definitely a bug in Robot and needs to be fixed. I believe it's best to change Robot's logging so that messages coming from non-main threads are silently ignored. I already though about rejecting such messages in comments to issue 893 but that was never implemented.

Reply via email to