-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
emiter: add "streaming brief" feature
This commit adds a new feature to the Emitter, tentatively called "streaming brief". It is initially disabled, and can be enabled in the Emitter's init() call. Once enabled, the feature will leverage the "multi-action" nature of progress() calls to "stream", in a single line, info-level log messages and text written to the open_stream()'s pipe. For example, the following sequence of calls in BRIEF mode: ``` emit.progress("Starting stage 1", permanent=False) ... log.info("Doing first step") ... log.info("Doing second step") ... emit.progress("Finished stage 1", permanent=True) ``` ... will cause the two 'info' messages to "stream" on the terminal, prefixed by "Starting stage 1 ::" to indicate that they are related to that progress message. All these three messages are ephemeral which means that in the end only the final progress() call will be visible on the terminal. Fixes #165
- Loading branch information
Showing
5 changed files
with
265 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.