From edd84f950ed2fded9d97852bc27efc5283977c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Acun=CC=83a?= Date: Tue, 18 Apr 2017 16:54:03 -0300 Subject: [PATCH 1/2] Add rotate options --- lib/agent/common.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/agent/common.js b/lib/agent/common.js index b1e731acf..6eb00e51e 100644 --- a/lib/agent/common.js +++ b/lib/agent/common.js @@ -9,6 +9,14 @@ var log_file = (program.logfile || common.helpers.running_on_background()) ? (program.logfile || paths.log_file) : null; var log_level = program.debug ? 'debug' : 'info'; -common.logger = require('petit').new({ level: log_level, file: log_file }); +common.logger = require('petit').new({ + level : log_level, + file : log_file, + rotate : true, + size : 2000000, + limit : 9, + compress: true, + dest : paths.config + }); module.exports = common; From c676df1ce3208628f77a6bd3a502847027f69216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Acun=CC=83a?= Date: Tue, 2 May 2017 09:55:43 -0300 Subject: [PATCH 2/2] Modify petit repository --- npm-shrinkwrap.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 4305650e8..967d8708d 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -522,8 +522,8 @@ }, "petit": { "version": "0.0.5", - "from": "https://registry.npmjs.org/petit/-/petit-0.0.5.tgz", - "resolved": "https://registry.npmjs.org/petit/-/petit-0.0.5.tgz" + "from": "git://github.com/javo/petit.git#5cdae52626a0999722f32efe66b0976b7126111e", + "resolved": "git://github.com/javo/petit.git#5cdae52626a0999722f32efe66b0976b7126111e" }, "qs": { "version": "2.3.3",