luster-var-log
v0.2.4
Published
Stream luster master and workers output to files
Downloads
1
Readme
luster-var-log
Stream all std output from luster master and workers to files.
This extension supports:
- logfile reopening on
SIGHUP
(by default) - custom log line transformation functions
Usage
Install extension module to application:
$ npm install --save luster-var-log
Add "luster-var-log"
to "extensions"
section in the luster configuration:
module.exports = {
extensions: {
'luster-var-log': {
// Signal that process should handle to reopen logfiles
// signal: 'SIGHUP',
// Transform each line with custom transform function
// transformFn: function(proc, line) {return 'prefix ' + line;},
// logs files, both optional
// {string} fileName – stream output to file
// true – don't redirect output, keep as is
// false – shutdown output
stdout: '/var/log/app/stdout.log',
stderr: '/var/log/app/stderr.log'
}
}
};