We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a small express application that writes logs to a file.
In morgan, I'm doing the following:
// ... app.use( morgan('combined', { stream: fs.createWriteStream('./my_file.log', { flags: 'a', }), }) );
However, this won't work if I switch to cabin: (Still logs to console but no changes to file)
const Cabin = require('cabin'); const cabin= new Cabin({ stream: fs.createWriteStream('./test.log', { flags: 'a', }), }); // ... app.use(cabin.middleware);
The text was updated successfully, but these errors were encountered:
You can use axe option to use morgan or pino (e.g. pino stream).
axe
morgan
pino
Sorry, something went wrong.
const cabin = new Cabin({ axe: { logger: env === 'production' ? pino : morgan // whatever you want here (in place of `console`) } });
No branches or pull requests
I have a small express application that writes logs to a file.
In morgan, I'm doing the following:
However, this won't work if I switch to cabin: (Still logs to console but no changes to file)
The text was updated successfully, but these errors were encountered: