@boost/log
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -6,2 +6,15 @@ # Change Log | ||
### 1.1.8 - 2019-12-27 | ||
#### 🐞 Fixes | ||
- Reduce internal debug output verbosity. ([4b11141](https://github.com/milesj/boost/commit/4b11141)) | ||
- Rename env vars to not collide with Boost C++ library. ([b3d1153](https://github.com/milesj/boost/commit/b3d1153)) | ||
**Note:** Version bump only for package @boost/log | ||
### 1.1.7 - 2019-12-07 | ||
@@ -8,0 +21,0 @@ |
@@ -8,2 +8,3 @@ "use strict"; | ||
const chalk_1 = __importDefault(require("chalk")); | ||
const internal_1 = require("@boost/internal"); | ||
const isAllowedLogLevel_1 = __importDefault(require("./isAllowedLogLevel")); | ||
@@ -20,8 +21,10 @@ const constants_1 = require("./constants"); | ||
let silent = false; | ||
constants_1.debug('New logger created'); | ||
constants_1.debug(' Default level: %s', process.env.BOOST_LOG_DEFAULT_LEVEL); | ||
constants_1.debug(' Max level: %s', process.env.BOOST_LOG_MAX_LEVEL); | ||
{ | ||
const defaultLevel = internal_1.env('LOG_DEFAULT_LEVEL'); | ||
const maxLevel = internal_1.env('LOG_MAX_LEVEL'); | ||
constants_1.debug('New logger created: %s %s', defaultLevel ? `${defaultLevel} level` : 'all levels', maxLevel ? `(max ${maxLevel})` : ''); | ||
} | ||
function logger(message, ...args) { | ||
const self = logger; | ||
const defaultLevel = process.env.BOOST_LOG_DEFAULT_LEVEL; | ||
const defaultLevel = internal_1.env('LOG_DEFAULT_LEVEL'); | ||
if (defaultLevel && self[defaultLevel]) { | ||
@@ -39,3 +42,3 @@ self[defaultLevel](message, ...args); | ||
value: function log(message, ...args) { | ||
const maxLevel = process.env.BOOST_LOG_MAX_LEVEL; | ||
const maxLevel = internal_1.env('LOG_MAX_LEVEL'); | ||
if (!silent && isAllowedLogLevel_1.default(level, maxLevel)) { | ||
@@ -42,0 +45,0 @@ const output = util_1.default.format(message, ...args); |
{ | ||
"name": "@boost/log", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Lightweight level based logging system.", | ||
@@ -23,4 +23,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@boost/internal": "^1.0.1", | ||
"@boost/translate": "^1.3.2", | ||
"@boost/internal": "^1.0.2", | ||
"@boost/translate": "^1.3.3", | ||
"chalk": "^3.0.0" | ||
@@ -32,3 +32,3 @@ }, | ||
}, | ||
"gitHead": "a7fac69582efb763b9d5caa525a2f602245506b7" | ||
"gitHead": "2121f3e6c0b9a9db0559abd65a889253a74f3c03" | ||
} |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
14332
151
1
Updated@boost/internal@^1.0.2
Updated@boost/translate@^1.3.3