From 610dfd9cd64a1cd81a21298636a9348d25562082 Mon Sep 17 00:00:00 2001 From: jkaplon Date: Wed, 9 Dec 2015 13:44:33 -0500 Subject: [PATCH] Set max size for log files; move logs into folder; ignore logs folder. --- .gitignore | 2 +- server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c7cb359..b9de689 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules db -*.log +logs diff --git a/server.js b/server.js index 2c4b18e..6a31379 100644 --- a/server.js +++ b/server.js @@ -7,7 +7,7 @@ var fs = require("fs"); var bodyParser = require("body-parser"); var app = express(); var winston = require('winston'); -winston.add(winston.transports.File, { filename: 'courtsopen.log' }); +winston.add(winston.transports.File, { filename: './logs/courtsopen.log', maxsize: 5000000 }); // 5MB // Setup email var transporter = nodemailer.createTransport({