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

Not working Express #6

Open
karthicguru opened this issue Aug 3, 2015 · 0 comments
Open

Not working Express #6

karthicguru opened this issue Aug 3, 2015 · 0 comments

Comments

@karthicguru
Copy link

Hi,

I'm using winston, winston-express and winston-rollbar modules for error logging.
Currently the logging is not working for me..

var winston = require('winston'),
expressWinston = require('express-winston'),
logDir = 'log',
errorLogger,
requestlogger;
require('winston-rollbar').Rollbar;

var options = {'rollbarAccessToken':'7d38e90d23c44eb2b8dd1ca6a0cd67d8',endpoint: "https://api.rollbar.com/api/1/"}
winston.add(winston.transports.Rollbar, options);

errorLogger = new winston.Logger({
transports: [
new winston.transports.Rollbar(options)
],
exitOnError: false
});
requestlogger = new winston.Logger({
transports: [
new winston.transports.Rollbar(options)
],
exceptionHandlers: [
new winston.transports.Rollbar(options)
]
exitOnError: false
});

exports.winstonExpressRequestLog = expressWinston.logger({
winstonInstance: requestlogger,
msg: "HTTP {{req.method}} {{req.url}}",
meta: true,
colorStatus: true,
});

thanks in advance..

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

1 participant