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.
Customizable Logger
In the current major version, we exclusively use debug for debug logs. This PR exports a
Logger
interface that will allow people to provide a custom logger for@oclif/core
to use. This will be useful if you want all the@oclif/core
debug logs to go through your own logger.The default logger will continue to use
debug
under the hood. So if you choose to use the default, you can continue to use theDEBUG
environment variable to access the debug logs in the console. The only breaking change will be that the namespace for all the logs with be prefixed with a root namespace,oclif
.So if you're used to using
DEBUG=config:* my-cli do stuff
, you'll need to start doing this instead:DEBUG=oclif:config:* my-cli do stuff
Interface
Usage
You can also provide the logger to
Config
, in the event that you instantiateConfig
before callingrun
orexecute
@W-15470578@