-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: streaming debug logfile #4062
Merged
Merged
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
lukekarrys
force-pushed
the
lk/stream-log-file
branch
16 times, most recently
from
November 30, 2021 01:09
4394532
to
64e70ba
Compare
darcyclarke
added
semver:minor
new backwards-compatible feature
Release 8.x
work is associated with a specific npm 8 release
labels
Nov 30, 2021
lukekarrys
force-pushed
the
lk/stream-log-file
branch
from
November 30, 2021 17:19
64e70ba
to
b9c3857
Compare
wraithgar
reviewed
Nov 30, 2021
wraithgar
reviewed
Nov 30, 2021
wraithgar
reviewed
Nov 30, 2021
wraithgar
reviewed
Nov 30, 2021
wraithgar
reviewed
Nov 30, 2021
wraithgar
reviewed
Nov 30, 2021
lukekarrys
force-pushed
the
lk/stream-log-file
branch
from
November 30, 2021 22:48
372d6ca
to
3ac7224
Compare
lukekarrys
force-pushed
the
lk/stream-log-file
branch
4 times, most recently
from
December 1, 2021 03:00
a87c1c9
to
08279b9
Compare
wraithgar
approved these changes
Dec 1, 2021
lukekarrys
force-pushed
the
lk/stream-log-file
branch
14 times, most recently
from
December 2, 2021 00:35
eb30d29
to
3437a53
Compare
This decouples the log file writing from the terminal logging. We now open an append only file at the start of the process and stream logs to it. We still only display the log file message in timing mode or if there is an error, but the file is still written regardless. All logging now goes through `proc-log` and this is the first step to removing `npmlog`. For now `npmlog` is still used for the terminal logging but with a shim in front of it to make it easier to test and use in conjunction with `proc-log`. Ref: npm/statusboard#366 This also refactors many of the tests to always use an explicit `t.testdir` for their cache since the file is opened on each `new Npm()`. Tests are also refactored to use more of `MockNpm` with behavior to add config items and load `npm` if necessary. A new fixture `mockGlobals` was also added to make much of this more ergonomic. Ref: npm/statusboard#410 Closes npm/statusboard#411 Closes npm/statusboard#367 PR-URL: #4062 Credit: @lukekarrys Close: #4062 Reviewed-by: @wraithgar
lukekarrys
force-pushed
the
lk/stream-log-file
branch
from
December 2, 2021 00:44
3437a53
to
6734ba3
Compare
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Release 8.x
work is associated with a specific npm 8 release
semver:minor
new backwards-compatible feature
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 decouples the log file writing from the terminal logging. We now
open an append only file at the start of the process and stream logs to
it. We still only display the log file message in timing mode or if
there is an error, but the file is still written regardless.
All logging now goes through
proc-log
and this is the first step toremoving
npmlog
. For nownpmlog
is still used for the terminallogging but with a shim in front of it to make it easier to test and
use in conjunction with
proc-log
. Ref: npm/statusboard#366This also refactors many of the tests to always use an explicit
t.testdir
for their cache since the file is opened on eachnew Npm()
.Tests are also refactored to use more of
MockNpm
with behavior toadd config items and load
npm
if necessary. A new fixturemockGlobals
was also added to make much of this more ergonomic. Ref: npm/statusboard#410
Closes npm/statusboard#411
Closes npm/statusboard#367