@apify/log
Advanced tools
Comparing version 2.4.9 to 2.5.0
@@ -19,14 +19,8 @@ import { EventEmitter } from 'events'; | ||
declare const LEVEL_TO_STRING: string[]; | ||
/** | ||
* A symbol used to mark a limited depth object as having come from an error | ||
* @internal | ||
*/ | ||
declare const IS_APIFY_LOGGER_EXCEPTION: unique symbol; | ||
interface Exception extends Error { | ||
type?: string; | ||
details?: Record<string, any>; | ||
reason?: string; | ||
} | ||
declare class LoggerText extends Logger { | ||
constructor(options?: {}); | ||
_log(level: LogLevel, message: string, data?: any, exception?: Exception, opts?: Record<string, any>): string; | ||
_parseException(exception: Exception): string; | ||
} | ||
/** | ||
@@ -44,3 +38,3 @@ * This is an abstract class that should | ||
_outputWithConsole(level: LogLevel, line: string): void; | ||
_log(level: LogLevel, message: string, data?: any, exception?: Exception, opts?: Record<string, any>): void; | ||
_log(level: LogLevel, message: string, data?: any, exception?: unknown, opts?: Record<string, any>): void; | ||
log(level: LogLevel, message: string, ...args: any[]): void; | ||
@@ -236,10 +230,28 @@ } | ||
declare function limitDepth<T>(record: T, depth: number, maxStringLength?: number): T | undefined; | ||
interface LimitedError { | ||
[IS_APIFY_LOGGER_EXCEPTION]: true; | ||
name: string; | ||
message: string; | ||
stack?: string; | ||
cause?: unknown; | ||
type?: string; | ||
details?: Record<string, unknown>; | ||
reason?: string; | ||
[key: string]: unknown; | ||
} | ||
declare class LoggerJson extends Logger { | ||
constructor(options?: {}); | ||
_log(level: LogLevel, message: string, data?: any, exception?: Exception, opts?: Record<string, any>): string; | ||
_log(level: LogLevel, message: string, data?: any, exception?: unknown, opts?: Record<string, any>): string; | ||
} | ||
declare class LoggerText extends Logger { | ||
constructor(options?: {}); | ||
_log(level: LogLevel, message: string, data?: any, exception?: unknown, opts?: Record<string, any>): string; | ||
protected _parseException(exception: unknown, indentLevel?: number): string; | ||
private _parseLoggerException; | ||
} | ||
declare const log: Log; | ||
export { type Exception, LEVELS, LEVEL_TO_STRING, Log, LogFormat, LogLevel, Logger, LoggerJson, type LoggerOptions, LoggerText, PREFIX_DELIMITER, log as default, getFormatFromEnv, getLevelFromEnv, limitDepth, truncate }; | ||
export { IS_APIFY_LOGGER_EXCEPTION, LEVELS, LEVEL_TO_STRING, type LimitedError, Log, LogFormat, LogLevel, Logger, LoggerJson, type LoggerOptions, LoggerText, PREFIX_DELIMITER, log as default, getFormatFromEnv, getLevelFromEnv, limitDepth, truncate }; |
{ | ||
"name": "@apify/log", | ||
"version": "2.4.9", | ||
"version": "2.5.0", | ||
"description": "Tools and constants shared across Apify projects.", | ||
@@ -54,3 +54,3 @@ "main": "./cjs/index.cjs", | ||
}, | ||
"gitHead": "bbbd929dd531566d9db0b817035c5f43d6645bb1" | ||
"gitHead": "24427821940e4b356acd7463e1c1d8d9901f2ef0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
147270
1300