[
https://issues.apache.org/jira/browse/DISPATCH-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17032620#comment-17032620
]
ASF subversion and git services commented on DISPATCH-1536:
-----------------------------------------------------------
Commit b56c276f2c4bb569135ee3ad93612a9fc37264f2 in qpid-dispatch's branch
refs/heads/master from Charles E. Rolke
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=b56c276 ]
DISPATCH-1536: Microsecond timestamp utility for self-tests
This commit pulls the Logger class out of system_tests_edge_router and
places it into system_tests for easy access.
An example consumer of Logger is the MobileAddressTest. That test creates
a logger and loads it with facts as the test progresses but it doesn't print
anything unless there is a test failure.
By default Logger does not print to the console and it saves each log
line as it goes. When Logger is initialized either of these defaults
may be overridden.
How to print to the console with a timestamp:
from system_test import Logger
...
self.log2 = Logger(print_to_console=True, save_for_dump=False)
self.log2.log("Help I'm a Rock")
> Tests needs common utility for printing timestamped messages
> ------------------------------------------------------------
>
> Key: DISPATCH-1536
> URL: https://issues.apache.org/jira/browse/DISPATCH-1536
> Project: Qpid Dispatch
> Issue Type: Improvement
> Components: Tests
> Affects Versions: 1.10.0
> Reporter: Charles E. Rolke
> Assignee: Charles E. Rolke
> Priority: Major
>
> Rather than using naked python print statements, a test-system utility could
> prefix the text with a timestamp and flush to stdout.
> The timestamp would correlate the test progress precisely with the router log
> files.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]