Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

DISPATCH-1536: Microsecond timestamp utility for self-tests#678

Merged
asfgit merged 1 commit into
apache:masterfrom
ChugR:DISPATCH-1536
Feb 7, 2020
Merged

DISPATCH-1536: Microsecond timestamp utility for self-tests#678
asfgit merged 1 commit into
apache:masterfrom
ChugR:DISPATCH-1536

Conversation

@ChugR
Copy link
Copy Markdown
Contributor

@ChugR ChugR commented Feb 6, 2020

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")

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")
@asfgit asfgit merged commit b56c276 into apache:master Feb 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants