{"action":"closed","issue":{"url":"https://api.github.com/repos/trentm/node-bunyan/issues/394","repository_url":"https://api.github.com/repos/trentm/node-bunyan","labels_url":"https://api.github.com/repos/trentm/node-bunyan/issues/394/labels{/name}","comments_url":"https://api.github.com/repos/trentm/node-bunyan/issues/394/comments","events_url":"https://api.github.com/repos/trentm/node-bunyan/issues/394/events","html_url":"https://github.com/trentm/node-bunyan/issues/394","id":148623071,"number":394,"title":"stop logs print in lower levels with rotating-files","user":{"login":"Turok21","id":12861756,"avatar_url":"https://avatars.githubusercontent.com/u/12861756?v=3","gravatar_id":"","url":"https://api.github.com/users/Turok21","html_url":"https://github.com/Turok21","followers_url":"https://api.github.com/users/Turok21/followers","following_url":"https://api.github.com/users/Turok21/following{/other_user}","gists_url":"https://api.github.com/users/Turok21/gists{/gist_id}","starred_url":"https://api.github.com/users/Turok21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Turok21/subscriptions","organizations_url":"https://api.github.com/users/Turok21/orgs","repos_url":"https://api.github.com/users/Turok21/repos","events_url":"https://api.github.com/users/Turok21/events{/privacy}","received_events_url":"https://api.github.com/users/Turok21/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/trentm/node-bunyan/labels/Component-Lib","name":"Component-Lib","color":"207de5"},{"url":"https://api.github.com/repos/trentm/node-bunyan/labels/Type-Question","name":"Type-Question","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-15T10:29:00Z","updated_at":"2016-04-21T07:50:38Z","closed_at":"2016-04-21T07:50:38Z","body":"Hi,\r\n\r\nI'm trying to stop logs be print in lower level, but I don't find a solution for it : \r\nI already see issues : #334 #320 #339 #305 and some others,\r\nAnd also inspect https://github.com/trentm/node-bunyan/blob/master/examples/specific-level-streams.js\r\n\r\nBut i don't reach to do specific level with \"rotating-file\"\r\nI am stuck with this and don't reach to found a solution\r\n\r\nHere my configuration file : \r\n```\r\nvar NODE_ENV = process.env.NODE_ENV || 'local';\r\nvar config   = require('../../config.json')[NODE_ENV];\r\nvar path     = config.logs.path; // like \"./utils/logs/\"\r\n\r\nvar configLogger = {\r\n    name    : \"xxxxxxxx\",\r\n    streams : []\r\n};\r\n```\r\n```\r\n/************************* ***************************/\r\n/***************    STREAM IN FILES   ****************/\r\n    var levels = ['debug', 'info', 'warn', 'error', 'trace'];\r\n    var _logLevel = function (level) {\r\n        return {\r\n            type   : 'rotating-file',\r\n            period : '1w',\r\n            count  : 52,\r\n            level  : level,\r\n            path   : path + 'application-' + level + '.log'\r\n        };\r\n    };\r\n    levels.forEach(function (level) {\r\n        configLogger.streams.push(_logLevel(level));\r\n    }, this);\r\n/******************  END    FILES  *******************/\r\n```\r\n\r\n\r\nSo at the end, \r\nconfigLogger likes : \r\n```\r\n{ name: 'xxxxxxxx',\r\n  streams: \r\n   [ { type: 'rotating-file',\r\n       period: '1w',\r\n       count: 52,\r\n       level: 'debug',\r\n       path: './utils/logs/apps-debug.log' },\r\n     { type: 'rotating-file',\r\n       period: '1w',\r\n       count: 52,\r\n       level: 'info',\r\n       path: './utils/logs/apps-info.log' },\r\n     { type: 'rotating-file',\r\n       period: '1w',\r\n       count: 52,\r\n       level: 'warn',\r\n       path: './utils/logs/apps-warn.log' },\r\n     { type: 'rotating-file',\r\n       period: '1w',\r\n       count: 52,\r\n       level: 'error',\r\n       path: './utils/logs/apps-error.log' },\r\n     { type: 'rotating-file',\r\n       period: '1w',\r\n       count: 52,\r\n       level: 'trace',\r\n       path: './utils/logs/apps-trace.log' } ] }\r\n```\r\n\r\nand I `configLogger.level = \"trace\"; \r\nmodule.exports = require('bunyan').createLogger(configLogger);`\r\n\r\nI'm here asking your help using bunyan ;)\r\n\r\nThanks for helping"}}