Cut Log File Stream
Support morgan
Support timeZone
Install
npm install --save cut-file-stream
Usage
Format filename:
- YYYY => Year
- MM => Month
- DD => Day
- H => Hour
- M => minute
- S => Second
Cut file stream by day
var cts = ;var stream = cfs;
Cut file stream by hour
var cts = ;var stream = cfs;
Cut file stream by minute
var cts = ;var stream = cfs;
Get format datetime
var cts = ;var stream = cts;// return 201507311230
If no filename, stdout will return
If no timeZone, default timeZone will be BeiJing: UTC+8
Bug fixed list
2015/07/31 Export method getDateTime 2015/07/16 Support multi log file steam
Contact
If you have any question, please contact me zhaoshuxiang2010@gmail.com