Comparing version 0.8.12 to 0.8.15
@@ -54,2 +54,5 @@ "use strict"; | ||
data.output = tinytim.tim(format, data); | ||
// save unprocessed output | ||
data.rawoutput = data.output; | ||
@@ -76,3 +79,3 @@ // process every filter method | ||
dateformat : "isoDateTime", | ||
preprocess : function(data) { | ||
preprocess : function() { | ||
}, | ||
@@ -100,3 +103,3 @@ transport : function(data) { | ||
} | ||
// union user's config and default | ||
@@ -103,0 +106,0 @@ _config = utils.union(_config, userConfig); |
"use strict"; | ||
var fs = require('fs'), dateFormat = require('dateformat'), tinytim = require('tinytim'), utils = require('./utils'), spawn = require('child_process').spawn, spawnSync = require('child_process').spawnSync; | ||
var path = require('path'); | ||
// var path = require('path'); | ||
var os = require('os'); | ||
@@ -68,4 +68,4 @@ var mkdirp = require('mkdirp'); | ||
} else { | ||
var logFile = _logMap[title], now = dateFormat(new Date(), _conf.splitFormat); | ||
if (logFile && logFile.date != now) { | ||
var logFile = _logMap[title], nowAgain = dateFormat(new Date(), _conf.splitFormat); | ||
if (logFile && logFile.date != nowAgain) { | ||
logFile.destroy(); | ||
@@ -75,3 +75,3 @@ logFile = null; | ||
if (!logFile) { | ||
logFile = _logMap[title] = new LogFile(title, now); | ||
logFile = _logMap[title] = new LogFile(title, nowAgain); | ||
spawn('find', [_conf.root, '-type', 'f', '-name', '*.log', '-mtime', '+' + _conf.maxLogFiles, '-exec', 'rm', '{}', '\;']); | ||
@@ -78,0 +78,0 @@ } |
@@ -9,8 +9,8 @@ { | ||
}, | ||
"version": "0.8.12", | ||
"version": "0.8.15", | ||
"author": "LI Long <lilong@gmail.com>", | ||
"license": "MIT", | ||
"dependencies": { | ||
"colors": "1.1.2", | ||
"dateformat": "2.0.0", | ||
"colors": "1.2.3", | ||
"dateformat": "3.0.3", | ||
"mkdirp": "^0.5.1", | ||
@@ -24,5 +24,7 @@ "tinytim": "0.1.1" | ||
"istanbul": "^0.4.5", | ||
"mongoskin": "0.3.0" | ||
"mongoskin": "0.3.0", | ||
"tslint": "^5.9.1" | ||
}, | ||
"main": "./lib/index", | ||
"types": "./lib/index.d.ts", | ||
"keywords": [ | ||
@@ -36,6 +38,8 @@ "log", | ||
"test": "expresso test/*", | ||
"lint:fix": "eslint --fix .", | ||
"lint": "eslint .", | ||
"posttest": "npm run lint", | ||
"test:coverage": "istanbul cover expresso test/*.js", | ||
"posttest:coverage": "npm run lint" | ||
"posttest:coverage": "npm run lint", | ||
"dtslint": "dtslint ." | ||
}, | ||
@@ -42,0 +46,0 @@ "engines": { |
@@ -271,3 +271,3 @@ # tracer for node.js | ||
console.log(data.output); | ||
fs.appendFile('./file.log', data.output + '\n', (err) => { | ||
fs.appendFile('./file.log', data.rawoutput + '\n', (err) => { | ||
if (err) throw err; | ||
@@ -298,3 +298,3 @@ }); | ||
mode: 0666 | ||
}).write(data.output+"\n"); | ||
}).write(data.rawoutput+"\n"); | ||
} | ||
@@ -348,3 +348,3 @@ }); | ||
function (data) { | ||
fs.appendFile('./file.log', data.output + '\n', (err) => { | ||
fs.appendFile('./file.log', data.rawoutput + '\n', (err) => { | ||
if (err) throw err; | ||
@@ -490,2 +490,7 @@ }); | ||
### 0.8.15 | ||
* Adding type definitions #84 by @kobim | ||
* Added data.rawoutput #83 by @Royalgamer06 | ||
* recommended linting #82 by @elomariAchraf | ||
### 0.8.12 | ||
@@ -492,0 +497,0 @@ * added the ability to load the config from a file. #80 thanks @muthursyamburi |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61673
50
1273
644
6
+ Addedcolors@1.2.3(transitive)
+ Addeddateformat@3.0.3(transitive)
- Removedcolors@1.1.2(transitive)
- Removeddateformat@2.0.0(transitive)
Updatedcolors@1.2.3
Updateddateformat@3.0.3