logrevolver
v0.1.4
Published
Node Access Logger with Rotation
Downloads
33
Maintainers
Readme
Gyrologger
Access Logging with Rotation in Express
Usage
- Define a Config Object
config = {
// Logging Levels
level: 'silly' || 'verbose' || 'info' || 'warn' || 'error',
// Log directory
dirname: 'log',
// Log Filename Prefix
filename: 'app.log',
// Maxsize of Log File
maxsize: 20971520,
// Maximum No. of files to be generated
maxFiles: 25,
// Datepattern Suffix
datePattern: '.DD-MM-YYYY',
// Use Console transport or not
console: false,
//
colorizeConsole: true,
};
- Use in Express
const app = express();
app.use(require('gyrologger')(config))