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

feat(dependencies): Remove direct debug dependency #2296

Merged
merged 2 commits into from
Apr 8, 2021
Merged

Conversation

daffl
Copy link
Member

@daffl daffl commented Apr 8, 2021

This pull request removes the direct dependency on the debug module for the following reasons:

  • Makes it easier support for other platforms (like Deno, see Deno Support? #1964)
  • Reduces the client side core production bundle size by at least 20%
  • Lets you pipe Feathers debug information into your own logger

Normal debug support can easily be added like this:

const feathers = require('@feathersjs/feathers');
const debug = require('debug');

feathers.setDebug(debug);

This change will apply to all @feathersjs/module.

To use your own logger:

const feathers = require('@feathersjs/feathers');
const winston = require('winston');

feathers.setDebug(name => (...args) => winston.debug(name, ...args));

@daffl daffl merged commit 501d416 into dove Apr 8, 2021
@daffl daffl deleted the remove-debug branch April 8, 2021 23:17
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