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

Winston is not logging to files when exitOnError is true #1421

Closed
mregula opened this issue Jul 26, 2018 · 1 comment
Closed

Winston is not logging to files when exitOnError is true #1421

mregula opened this issue Jul 26, 2018 · 1 comment

Comments

@mregula
Copy link

mregula commented Jul 26, 2018

Winston ver: 3.0.0
Node ver: 8.9.4
OS: Linux
Language: ES6

When option exitOnError is set to true, Winston is not logging to files:

const path = require('path');
const { createLogger, transports } = require('winston');
const wLogger = createLogger({
  exitOnError: true,
  transports: [
    new transports.File({ filename: path.join(__dirname, 'logs', 'combined.log') })
  ],
  exceptionHandlers: [
    new transports.File({ filename: path.join(__dirname, 'logs', 'exceptions.log')})
  ]
});
throw new Error('Something failed at startup');
@DABH
Copy link
Contributor

DABH commented Sep 21, 2018

This is a known issue, see e.g. #1289 and #1355 -- hopefully we get a fix into the next release. Thanks for reporting!

@DABH DABH closed this as completed Sep 21, 2018
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

No branches or pull requests

2 participants