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

refactor: logging [BREAKING CHANGE] #749

Merged
merged 4 commits into from
Apr 15, 2022
Merged

refactor: logging [BREAKING CHANGE] #749

merged 4 commits into from
Apr 15, 2022

Conversation

chimurai
Copy link
Owner

Description

  • feat(option): logger
  • removed(option): logProvider and logLevel
  • docs(logger): examples with console, winston, pino, bunyan, log4js
  • refactor: improved request/response logging

Motivation and Context

simplify internals with better logging and improved compatibility with external loggers.

fixes #123
fixes #194
fixes #351
fixes #747

How has this been tested?

  • docs
  • unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@chimurai chimurai added this to the v3.0.0 milestone Apr 15, 2022
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 97.0% when pulling 05ef657 on refactor-logger into 33f9f5a on v3.

@chimurai chimurai merged commit 4bc66b9 into v3 Apr 15, 2022
@chimurai chimurai deleted the refactor-logger branch April 15, 2022 14:30
chimurai added a commit that referenced this pull request Apr 22, 2022
* feat(option): logger

* refactor(router, path-rewriter): log with debug [BREAKING CHANGE]

* refactor(logger): log request and response with logger plugin

* refactor(logger): replace logLevel and logProvider with logger option [BREAKING CHANGE]
@dandv
Copy link

dandv commented Oct 7, 2022

Looks like an old types.d.ts was still shipped with the 2.0.6 release, so the logger option generates a TypeScript error.

image

Can you please take a look?

@chimurai
Copy link
Owner Author

chimurai commented Oct 7, 2022

Did you try to remove "node_modules" and install your dependencies again?

Also, looks like your using v3 options within v2...
V2 docs: https://github.com/chimurai/http-proxy-middleware/tree/v2.0.4#readme

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.

3 participants