Socket
Socket
Sign inDemoInstall

@lskjs/log

Package Overview
Dependencies
Maintainers
11
Versions
260
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lskjs/log - npm Package Compare versions

Comparing version 2.64.1 to 2.65.0

4

package.json
{
"name": "@lskjs/log",
"version": "2.64.1",
"version": "2.65.0",
"description": "Логгер совмещающий лучшие черты debug, bunyan, logfmt/logrus, morgan/winston, ",

@@ -55,3 +55,3 @@ "keywords": [],

},
"gitHead": "d9c716c50c2bc5c2798df875fdbfe8b86cf6d27e"
"gitHead": "f2c87233d5dccf3fb60600408810abd2f980d89b"
}

@@ -24,9 +24,24 @@ "use strict";

var prettyRawLog = function prettyRawLog(log, raw) {
var json = (0, _tryJSONparse.tryJSONparse)(raw);
var json;
var format;
if (!json && !!raw.trim()) {
json = (0, _tryLogfmtParse.tryLogfmtParse)(raw);
if (typeof raw === 'string') {
if (!json && !!raw.trim()) {
json = (0, _tryJSONparse.tryJSONparse)(raw, null);
format = 'json';
}
if (!json && !!raw.trim()) {
json = (0, _tryLogfmtParse.tryLogfmtParse)(raw, null);
format = 'logfmt';
}
}
if (!json) {
json = null; // eslint-disable-next-line @typescript-eslint/no-unused-vars
format = 'raw';
}
if (!json) {
log.log.apply(log, (0, _toConsumableArray2["default"])((0, _prettyFormat.prettyFormat)({}, raw)));

@@ -33,0 +48,0 @@ return;

@@ -16,3 +16,9 @@ "use strict";

if (!str.trim()) return defaultValue;
return logfmt.parse(str);
var res = logfmt.parse(str);
if (!Object.keys(res).length || Object.keys(res).length === 1 && Object.values(res)[0] === true) {
return defaultValue;
}
return res;
} catch (err) {

@@ -19,0 +25,0 @@ return defaultValue;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc