Socket
Socket
Sign inDemoInstall

@applitools/logger

Package Overview
Dependencies
Maintainers
39
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/logger - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

18

dist/logger.js

@@ -37,4 +37,4 @@ "use strict";

function makeLogger({ logger: baseLogger, ...options } = {}) {
var _a, _b, _c, _d, _e, _f, _g;
var _h, _j;
var _a, _b, _c, _d, _e, _f;
var _g, _h;
if (baseLogger)

@@ -44,4 +44,4 @@ return baseLogger.extend({ level: options.level, ...options.format });

(_b = options.format) !== null && _b !== void 0 ? _b : (options.format = {});
(_c = (_h = options.format).formatter) !== null && _c !== void 0 ? _c : (_h.formatter = formatter_1.formatter);
(_d = (_j = options.format).colors) !== null && _d !== void 0 ? _d : (_j.colors = utils.general.getEnvValue('LOG_COLORS', 'boolean'));
(_c = (_g = options.format).formatter) !== null && _c !== void 0 ? _c : (_g.formatter = formatter_1.formatter);
(_d = (_h = options.format).colors) !== null && _d !== void 0 ? _d : (_h.colors = utils.general.getEnvValue('LOG_COLORS', 'boolean'));
let forceInitHandler;

@@ -70,5 +70,4 @@ if (!options.handler) {

if (!utils.types.isNumber(options.level)) {
options.level =
(_f = (_e = options.level) !== null && _e !== void 0 ? _e : process.env.APPLITOOLS_LOG_LEVEL) !== null && _f !== void 0 ? _f : (process.env.APPLITOOLS_SHOW_LOGS === 'true' ? 'all' : 'silent');
options.level = (_g = log_level_1.LogLevel[options.level]) !== null && _g !== void 0 ? _g : log_level_1.LogLevel.silent;
(_e = options.level) !== null && _e !== void 0 ? _e : (options.level = (_f = utils.general.getEnvValue('LOG_LEVEL')) !== null && _f !== void 0 ? _f : (utils.general.getEnvValue('SHOW_LOGS', 'boolean') ? 'all' : undefined));
options.level = log_level_1.LogLevel[options.level];
}

@@ -157,10 +156,11 @@ if (utils.types.has(options.handler, 'type')) {

return options.reduce((baseOptions, currentOptions) => {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
return {
...baseOptions,
...currentOptions,
level: (_a = currentOptions.level) !== null && _a !== void 0 ? _a : baseOptions.level,
format: {
...baseOptions.format,
...currentOptions.format,
tags: mergeTags((_b = (_a = baseOptions.format) === null || _a === void 0 ? void 0 : _a.tags) !== null && _b !== void 0 ? _b : [], (_d = (_c = currentOptions.format) === null || _c === void 0 ? void 0 : _c.tags) !== null && _d !== void 0 ? _d : []),
tags: mergeTags((_c = (_b = baseOptions.format) === null || _b === void 0 ? void 0 : _b.tags) !== null && _c !== void 0 ? _c : [], (_e = (_d = currentOptions.format) === null || _d === void 0 ? void 0 : _d.tags) !== null && _e !== void 0 ? _e : []),
},

@@ -167,0 +167,0 @@ };

@@ -5,3 +5,3 @@ "use strict";

const log_level_1 = require("./log-level");
function makePrinter({ handler, level, format }) {
function makePrinter({ handler, level = log_level_1.LogLevel.silent, format }) {
var _a;

@@ -8,0 +8,0 @@ const formatter = (_a = format === null || format === void 0 ? void 0 : format.formatter) !== null && _a !== void 0 ? _a : ((chunks, options) => ({ chunks, options, isRaw: true }));

{
"name": "@applitools/logger",
"version": "2.0.1",
"version": "2.0.2",
"description": "Applitools logger",

@@ -65,3 +65,3 @@ "keywords": [

"devDependencies": {
"@applitools/bongo": "^3.0.4",
"@applitools/bongo": "^4.0.0",
"@types/debug": "^4.1.7",

@@ -68,0 +68,0 @@ "@types/node": "^12.20.55"

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