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
Conversation
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")
ganeshmurthy
approved these changes
Feb 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: