Comment #10 on issue 456 by pekka.klarck: When logging messages through stdout timestamps are not accurate
http://code.google.com/p/robotframework/issues/detail?id=456

Chris,

1) I agree it's better to use the new logging APIs from normal Python libraries. If that would be the only use case I would WontFix this issue.

2) Adding timestamp to the message is the only easy way I can think of us supporting timestamps with remote libraries. That's a pretty important use case I would like to support. Implementing both that and then some automatic timestamping mechanism sounds like a lot of work for very little benefits.

3) Implementing automatic timestamping for both Python and Java libs is a pretty large task. Notice that simply prefixing all captured messages with a timestamp isn't enough as, for example, this should create only one message:

    print '*INFO* Given list has following items',
    for item in given_list:
        print item,
    print

I know this is doable but it's so low on Robot core team's priority list that it is not going to happen in the foreseeable future. Are you Chris interested to implement this yourself? I can help e.g. with tests if you want.

4) I would say it's a bug if external code uses print for logging. Even in that case you do get those messages into Robot's log.


Reply via email to