Skip to content
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

Logging: Replace @hibas123/nodelogging with winston logger #31

Merged
merged 1 commit into from
Feb 20, 2021

Conversation

Patrick-Remy
Copy link
Contributor

@Patrick-Remy Patrick-Remy commented Jan 31, 2021

Currently this package is extremely verbose by default, and writes to /tmp files and console by default. This PR replaces the previously included, but rarely popular logging lib nodelogging by the widely-used lib winston. Also it adjusts log levels, to have fine-grained control over the output (now varies from debug, over silly and verbose to info).

The previous verbose property in the option is replaced by log to override and customize any logging behaviour. The simplest is to override log-level to e.g. error.

new dmxnet({
  log: { level: 'error' } 
})

or disable any outputs

new dmxnet({
  transports: []
})

This resolves #24, #23 and #18.

Also the PR #19 can be closed after merging this.

@Patrick-Remy Patrick-Remy changed the title Replace @hibas123/nodelogging with winston logger Logging: Replace @hibas123/nodelogging with winston logger Jan 31, 2021
@Patrick-Remy
Copy link
Contributor Author

Can you please merge the PR? As I think this is the only thing missing in this package, to be sort of usable as a dependency. I want to publish a homebridge package that relies on this package. But that isn't possible, as long as the previous logger is used, which is not configurable and creates unwanted files.

@margau
Copy link
Owner

margau commented Feb 20, 2021

Hi, thanks for the PR and sorry for the delay. Will test it soon and release/publish if okay. Thanks!

@margau margau merged commit b064c8d into margau:master Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with hibas123?
2 participants