prerender-access-log
v0.1.0
Published
Prerender plugin for creating access log file with morgan
Downloads
4
Readme
prerender-access-log
Prerender plugin for creating access log file with morgan, to be used with the prerender node application from https://github.com/prerender/prerender.
How to use
In your local prerender project run:
npm install prerender-access-log --save
Then in the server.js that initializes the prerender:
server.use(require('prerender-access-log'));
Configuration
The plugin uses the morgan for creating logs and file-stream-rotator for managing file names.
var server = prerender({
accessLog: {
// Check out the file-stream-rotator docs for parameters
fileStreamRotator: {
filename: '/var/logs/prerender/access-%DATE%.log',
frequency: 'daily',
date_format: 'YYYY-MM-DD',
verbose: false
},
// Check out the morgan docs for the available formats
morgan: {
format: 'combined'
}
}
});