@openfn/logger
Advanced tools
Comparing version 0.0.18 to 0.0.19
# @openfn/logger | ||
## 0.0.19 | ||
### Patch Changes | ||
- ca701e8: Log json with high-resolution timestamp | ||
## 0.0.18 | ||
@@ -4,0 +10,0 @@ |
@@ -27,3 +27,3 @@ type SanitizePolicies = 'remove' | 'obfuscate' | 'summarize' | 'none'; | ||
name?: string; | ||
time: number; | ||
time: string; | ||
}; | ||
@@ -66,8 +66,10 @@ type StringLog = [LogFns | 'confirm' | 'print', ...any]; | ||
declare const _default$1: (v: string) => boolean; | ||
declare const _default$2: (v: string) => boolean; | ||
declare const _default: (timeInMs: number) => string; | ||
declare const _default$1: (timeInMs: number) => string; | ||
declare const _default: () => bigint; | ||
declare const defaultLogger: Logger; | ||
export { JSONLog, LogLevel, LogOptions, Logger, SanitizePolicies, StringLog, mockLogger as createMockLogger, export_default as default, defaultLogger, _default$1 as isValidLogLevel, _default as printDuration }; | ||
export { JSONLog, LogLevel, LogOptions, Logger, SanitizePolicies, StringLog, mockLogger as createMockLogger, export_default as default, defaultLogger, _default$2 as isValidLogLevel, _default$1 as printDuration, _default as timestamp }; |
@@ -113,2 +113,7 @@ // src/logger.ts | ||
// src/util/timestamp.ts | ||
var start = BigInt(Date.now()) * BigInt(1e6); | ||
var startDiff = process.hrtime.bigint(); | ||
var timestamp_default = () => start + (process.hrtime.bigint() - startDiff); | ||
// src/options.ts | ||
@@ -211,5 +216,4 @@ var defaultEmitter = { | ||
message, | ||
time: Date.now() | ||
time: timestamp_default().toString() | ||
}; | ||
stringify2(output); | ||
emitter[level](stringify2(output)); | ||
@@ -411,3 +415,4 @@ }; | ||
is_valid_log_level_default as isValidLogLevel, | ||
duration_default as printDuration | ||
duration_default as printDuration, | ||
timestamp_default as timestamp | ||
}; |
{ | ||
"name": "@openfn/logger", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "Cross-package logging utility", | ||
@@ -5,0 +5,0 @@ "module": "dist/index.js", |
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
17607
469