Comparing version 1.1.3 to 1.1.4
@@ -8,7 +8,7 @@ "use strict"; | ||
function checkLogFile(path) { | ||
if(os.type() === 'Windows_NT') { | ||
if(!fs.existsSync(path)) { | ||
if (os.type() === 'Windows_NT') { | ||
if (!fs.existsSync(path)) { | ||
mkdirp(path); | ||
} | ||
}else { | ||
} else { | ||
spawnSync('mkdir', ['-p', path]); | ||
@@ -31,3 +31,3 @@ } | ||
this.date = date; | ||
this.path = tinytim.tim(_conf.logPathFormat, {root: _conf.root, prefix: prefix, date: date}); | ||
this.path = tinytim.tim(_conf.logPathFormat, { root: _conf.root, prefix: prefix, date: date }); | ||
checkLogFile(_conf.root); | ||
@@ -66,3 +66,3 @@ this.stream = fs.createWriteStream(this.path, { | ||
allLogFile = _logMap.allLogFile = new LogFile(_conf.allLogsFileName, now); | ||
spawn('find', ['./', '-type', 'f', '-name', '*.log', '-mtime', '+' + _conf.maxLogFiles, '-exec', 'rm', '{}', ';']); | ||
spawn('find', [_conf.root, '-type', 'f', '-name', '*.log', '-mtime', '+' + _conf.maxLogFiles, '-exec', 'rm', '{}', ';']); | ||
} | ||
@@ -69,0 +69,0 @@ allLogFile.write(str); |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"author": "LI Long <lilong@gmail.com>", | ||
@@ -21,9 +21,9 @@ "license": "MIT", | ||
"cli-color": "^2.0.0", | ||
"dtslint": "^3.6.13", | ||
"eslint": "^7.5.0", | ||
"mocha": "^8.0.1", | ||
"dtslint": "^4.0.4", | ||
"eslint": "^7.12.1", | ||
"mocha": "^8.2.0", | ||
"mongoskin": "2.1.0", | ||
"nyc": "^15.1.0", | ||
"tslint": "^6.1.1", | ||
"typescript": "^3.9.7" | ||
"tslint": "^6.1.3", | ||
"typescript": "^4.0.5" | ||
}, | ||
@@ -30,0 +30,0 @@ "main": "./lib/index", |
@@ -526,2 +526,7 @@ # tracer for node.js | ||
### 1.1.4 | ||
- Fixed fixes security vulnerability by GitHub bot | ||
- Merged fix bug then when set allLogFile cannot delete old old files #122. Thanks @horsefaced | ||
- Congratulations 1.1K Stargazers | ||
### 1.1.0 | ||
@@ -528,0 +533,0 @@ - Updated map tracer.warn to console.warn. Thanks @eouia |
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
37234
743