Comparing version 1.0.0 to 1.0.1
# 2pid changelog | ||
## [1.0.1](link/1.0.1) (2016-06-17) | ||
[Full Changelog](/compare/1.0.0...1.0.1) | ||
**What Was Done:** | ||
- update example of using | ||
- checking config variables | ||
- add default and test config files | ||
## [1.0.0](link/1.0.0) (2016-06-17) | ||
@@ -4,0 +13,0 @@ [Full Changelog](/compare/master...1.0.0) |
@@ -11,3 +11,3 @@ /* | ||
var Config = require('ivanoff-config'); | ||
var Config = require('2conf'); | ||
var config = new Config(); | ||
@@ -32,18 +32,20 @@ | ||
if(config.log.full) { | ||
winston.add(winston.transports.File, { name: 'full', filename: config.log.full, level: 'info' }); | ||
} | ||
if(config && config.log) { | ||
if(config.log.full) { | ||
winston.add(winston.transports.File, { name: 'full', filename: config.log.full, level: 'info' }); | ||
} | ||
if(config.log.error) { | ||
winston.add(winston.transports.File, { name: 'error', filename: config.log.error, level: 'error', handleExceptions: true }); | ||
} | ||
if(config.log.error) { | ||
winston.add(winston.transports.File, { name: 'error', filename: config.log.error, level: 'error', handleExceptions: true }); | ||
} | ||
if(config.log.sell) { | ||
winston.loggers.add('sell', { file: { name: 'sell', filename: config.log.sell, level: 'silly', json: false } }); | ||
var sellLog = winston.loggers.get('sell'); | ||
sellLog.remove(winston.transports.Console); | ||
if(config.log.sell) { | ||
winston.loggers.add('sell', { file: { name: 'sell', filename: config.log.sell, level: 'silly', json: false } }); | ||
var sellLog = winston.loggers.get('sell'); | ||
sellLog.remove(winston.transports.Console); | ||
winston.sell = function(message, encoding){ | ||
winston.money(message); | ||
sellLog.info(message); | ||
winston.sell = function(message, encoding){ | ||
winston.money(message); | ||
sellLog.info(message); | ||
} | ||
} | ||
@@ -50,0 +52,0 @@ } |
{ | ||
"name": "2log", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Logger", | ||
"main": "index.js", | ||
"dependencies": { | ||
"ivanoff-config": "^1.0.1", | ||
"2conf": "^1.0.0", | ||
"moment-timezone": "^0.5.4", | ||
@@ -9,0 +9,0 @@ "winston": "^2.2.0" |
# Log | ||
v.1.0.0 | ||
v.1.0.1 | ||
@@ -15,3 +15,3 @@ ## Install | ||
```javascript | ||
var log = require('ivanoff-log'); | ||
var log = require('2log'); | ||
@@ -18,0 +18,0 @@ log.info('just info'); |
3658
11
81
+ Added2conf@^1.0.0
+ Added2conf@1.0.2(transitive)
- Removedivanoff-config@^1.0.1