This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Conversation
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
70129e5
to
0bef569
Compare
kspearrin
reviewed
Dec 5, 2020
kspearrin
previously approved these changes
Dec 7, 2020
cscharf
reviewed
Dec 10, 2020
edb8533
to
85c2745
Compare
Use this class as a default for other services that would like to output to console. This service is overriden in CLI and Desktop to use CLI's consoleLogService and electronLogService, respectively.
85c2745
to
040474c
Compare
cscharf
approved these changes
Dec 11, 2020
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 is a repeat of #214 with a shim layer for browser timing and added (any) tests.
Objective
Establish a centralized means of handling console logging. Partially resolves bitwarden/cli/issues/188, which calls out the need to shunt all stdout to stderr when the --response flag is used. This is the first step toward that.
Files changed
--response
flag is meant to guarantee json output to stdout.CLI
andDesktop
use logService at the moment, by defaulting to a consoleLogService, we maintain behavior forweb
andbrowser
without requiring code changes.Changes from previous commit
Use browser-process-hrtime as a shim between node and browsers. This is well supported on canIUse.
I've also added tests of compatibility and behavior for base class, cli's log service, and electron log service. The base class is working in Karma and other tests are limited to Node.
Files
This commit will require commensurate merges in /bitwarden/cli#197 and /bitwarden/desktop#602