Updates:
        Labels: Target-2.6

Comment #4 on issue 456 by pekka.klarck: Log message timestamps are not accurate
http://code.google.com/p/robotframework/issues/detail?id=456

I would like to get this problem solved generally at some point, but nowadays there's also a workaround. The `BuiltIn.Log` keyword uses RF's internal modules for logging and thus produces log messages with correct timestamps. The example below demonstrates how it can be used from a Python based test library:

import time
from robot.libraries.BuiltIn import BuiltIn

class MyLibrary
    _log = BuiltIn().log

    def keyword(self):
        self._log('starting')
        time.sleep(0.5)
        self._log('ending', level='WARN')


For more information about using BuiltIn from your own libraries see:
http://robotframework.googlecode.com/svn/tags/robotframework-2.5.4/doc/userguide/RobotFrameworkUserGuide.html#using-robot-framework-s-internal-modules

Reply via email to