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

switch the logger to loglevel #116

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pstaabp
Copy link
Member

@pstaabp pstaabp commented Aug 22, 2022

This switches the logger from Winston to log level. A couple of reasons for this:

  • Winston is quite heavyweight and was designed to be a node/backend logger, not a client-side one.
  • I've been trying to switch webwork3 to using vite instead of webpack and Winston was not working with vite and didn't seem like there is much to do to switch.

The current version of this

  1. logs to the console using a number of levels (info, trace, debug, warn, error). This was a drop-in replacement for winston
  2. for errors the error is sent to the backend for logging.

The code for doing the posting to the server uses the built-in axios.api methods and is quite flexible if we would like to include a warn level, etc.

Also, I haven't yet tested the production version of webwork3 for testing.

Wanted to put this out there for feedback.

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.

1 participant