-
Notifications
You must be signed in to change notification settings - Fork 3
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
Removing redundant logging #379
Comments
Have you thought about how the library use case should be done with a global logger? Replacing the logger in every call to verify, prepare, publish sounds a bit off to me. Furthermore, this is racy and the output is not correct when functions get called concurrently. |
And I want to point out again that we are using |
I'm in favor of this direction, especially if we are able to remove forked functions to satisfy napi-rs! It does seem the parameterized writer only aids the current test suite, which can find a better way to check the implementation than comparing log messages. One ask I would make is to see what we can accomplish without dependencies, which add the risk of increased maintenance burden in the future (that may not be paid in a timely manner). For example, I have been meaning to remove thiserror and even anyhow, as even they come with an unfortunate amount of dependency-update noise and surface area this project doesn't require. If possible, I encourage you to evaluate what a solution without fern might look like, and if it is feasible, think this project would be more stable and future-proofed for the effort. Thank you for your effort driving these improvements forward -- each milestone is making the project healthier and simpler to use! |
General
As a follow up to the comment, #374 (comment). I'd like to open this to discuss removing the redundant logging stages.
Currently an output Writer is passed to each of the verify, prepare and publish stages and is used to output some content to the Writer https://github.com/semantic-release-cargo/semantic-release-cargo/blob/master/src/lib.rs#L155-L167. In cases where this is an error output, it makes sense to remove the writer and use the Error returned logging. However, for anything using the logger, ONLY
stderr
andstdout
are supported which will lead to inconsistent logging behavior both with the napi-rs implementation that provides it's own writer, and will not initialize a logger. and with the later stages like publish which output SOME data to the--output
provided path, orstdout
depending on if that flag is passed.I would like to open this ticket to provide swapping out the logger with a logger that supports passing a Writer, i.e. fern, so that we can unify the logging into a single place. I would then like to remove the
output
arguments from each of those stages in lib, and provide a mechanism for both napi-rs and more conventional artifacts to bootstrap the logger with an output file.Prior to starting this work I wanted to open this issue for feedback.
Summary
output
arguments from the each of the internal verify-conditions, prepare, publish functionsnapi-rs
andnon-napi
output
Writer and a consolelog compatible target for napi.The text was updated successfully, but these errors were encountered: