@cssynd/next-custom-logger
v1.1.1
Published
Next Custom Logger ==================
Downloads
21
Readme
Next Custom Logger
Because logging is important.
Setup
npm install --save @cssynd/next-custom-logger
In custom server:
const next = require('next');
const withCustomLogger = require('@cssynd/next-custom-logger');
const dev = process.env.NODE_ENV !== 'production';
const nextApp = withCustomLogger(next({ dev }), function (ctx, err) {
// custom logger callback
console.log(ctx);
});
... // serve start