@percy/logger
Advanced tools
Comparing version 1.9.1 to 1.10.0
import { colors } from './utils.js'; | ||
const LINE_PAD_REGEXP = /^(\n*)(.*?)(\n*)$/s; | ||
const URL_REGEXP = /https?:\/\/[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:;%_+.~#?&//=[\]]*)/i; | ||
@@ -97,4 +98,6 @@ const LOG_LEVELS = { | ||
let begin, | ||
end, | ||
suffix = ''; | ||
let label = 'percy'; | ||
let suffix = ''; | ||
@@ -107,6 +110,8 @@ if (arguments.length === 1) { | ||
[level, message] = [null, level]; | ||
} | ||
} // do not format leading or trailing newlines | ||
[, begin, message, end] = message.match(LINE_PAD_REGEXP); // include debug information | ||
if (this.level === 'debug') { | ||
// include debug info in the label | ||
if (debug) label += `:${debug}`; // include elapsed time since last log | ||
@@ -133,3 +138,3 @@ | ||
return `[${label}] ${message}${suffix}`; | ||
return `${begin}[${label}] ${message}${suffix}${end}`; | ||
} // True if stdout is a TTY interface | ||
@@ -136,0 +141,0 @@ |
{ | ||
"name": "@percy/logger", | ||
"version": "1.9.1", | ||
"version": "1.10.0", | ||
"license": "MIT", | ||
@@ -34,3 +34,3 @@ "repository": { | ||
}, | ||
"gitHead": "b2ff5100698488c8bf8c681972f4f2b9a1e2055f" | ||
"gitHead": "a6934eda4fc3b84845ae606d7f5a901f25e0a56f" | ||
} |
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
15791
323