0.2.3 • Published 6 years ago
luster-log-file v0.2.3
luster-log-file
Stream all output from luster master and workers to files.
Usage
Install extension module to application:
$ npm install --save luster-log-file
Add "luster-log-file"
to "extensions"
section in the luster configuration:
module.exports = {
// ...
extensions : {
"luster-log-file" : {
// override `console.log`, `.warn`, `.info` and `.error` methods
// to add severity marks to output
extendConsole : true,
// logs files, both optional
// {string} fileName – stream output to file
// true – don't redirect output, keep as is
// false – shut down output
stdout : "/var/run/luster/myapp/output.log",
stderr : "/var/run/luster/myapp/errors.log"
}
}
};
Have fun! Use console
logging methods or write to process.stdout
, no workers code modification required.