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: extended logging support #603

Merged
merged 6 commits into from
Aug 12, 2022
Merged

feat: extended logging support #603

merged 6 commits into from
Aug 12, 2022

Conversation

kukhariev
Copy link
Owner

@kukhariev kukhariev commented Aug 11, 2022

  • Built-in logger now support severity levels:

    app.use(
      '/files',
      uploadx({
        directory: 'upload',
        logLevel: <LogLevel>process.env.LOG_LEVEL || 'info'
      })
    );
  • Added support for custom loggers:

    const logger = someLoggerLib.createLogger({
      level: process.env.LOG_LEVEL || 'info',
    });
    
    app.use(
      '/upload',
      uploadx({
        directory: 'upload',
        logger: logger
      })
    );

@kukhariev kukhariev merged commit ce9d5a0 into master Aug 12, 2022
@kukhariev kukhariev deleted the feat-custom-logger branch August 12, 2022 06:52
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