@loglayer/shared
Advanced tools
+74
-38
@@ -289,7 +289,7 @@ //#region src/common.types.d.ts | ||
| */ | ||
| parentLogger: ILogLayer; | ||
| parentLogger: ILogLayer<any>; | ||
| /** | ||
| * The child logger instance | ||
| */ | ||
| childLogger: ILogLayer; | ||
| childLogger: ILogLayer<any>; | ||
| /** | ||
@@ -346,7 +346,7 @@ * The parent logger's context manager | ||
| */ | ||
| parentLogger: ILogLayer; | ||
| parentLogger: ILogLayer<any>; | ||
| /** | ||
| * The child logger instance | ||
| */ | ||
| childLogger: ILogLayer; | ||
| childLogger: ILogLayer<any>; | ||
| /** | ||
@@ -474,3 +474,3 @@ * The parent logger's log level manager | ||
| */ | ||
| interface ILogBuilder { | ||
| interface ILogBuilder<This = ILogBuilder<any>> { | ||
| /** | ||
@@ -505,3 +505,3 @@ * Sends a log message to the logging library under an info log level. | ||
| */ | ||
| withMetadata(metadata?: LogLayerMetadata): ILogBuilder; | ||
| withMetadata(metadata?: LogLayerMetadata): This; | ||
| /** | ||
@@ -512,3 +512,3 @@ * Specifies an Error to include with the log message | ||
| */ | ||
| withError(error: any): ILogBuilder; | ||
| withError(error: any): This; | ||
| /** | ||
@@ -519,3 +519,3 @@ * Enable sending logs to the logging library. | ||
| */ | ||
| enableLogging(): ILogBuilder; | ||
| enableLogging(): This; | ||
| /** | ||
@@ -526,3 +526,3 @@ * All logging inputs are dropped and stops sending logs to the logging library. | ||
| */ | ||
| disableLogging(): ILogBuilder; | ||
| disableLogging(): This; | ||
| } | ||
@@ -533,4 +533,52 @@ /** | ||
| */ | ||
| interface ILogLayer extends ILogBuilder { | ||
| interface ILogLayer<This = ILogLayer<any>> { | ||
| /** | ||
| * Sends a log message to the logging library under an info log level. | ||
| */ | ||
| info(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the warn log level | ||
| */ | ||
| warn(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the error log level | ||
| */ | ||
| error(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the debug log level | ||
| */ | ||
| debug(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the trace log level | ||
| */ | ||
| trace(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the fatal log level | ||
| */ | ||
| fatal(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Specifies metadata to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/metadata.html | Metadata Docs} | ||
| */ | ||
| withMetadata(metadata?: LogLayerMetadata): ILogBuilder<any>; | ||
| /** | ||
| * Specifies an Error to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/error-handling.html | Error Handling Docs} | ||
| */ | ||
| withError(error: any): ILogBuilder<any>; | ||
| /** | ||
| * Enable sending logs to the logging library. | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/basic-logging.html#enabling-disabling-logging | Enabling/Disabling Logging Docs} | ||
| */ | ||
| enableLogging(): This; | ||
| /** | ||
| * All logging inputs are dropped and stops sending logs to the logging library. | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/basic-logging.html#enabling-disabling-logging | Enabling/Disabling Logging Docs} | ||
| */ | ||
| disableLogging(): This; | ||
| /** | ||
| * Calls child() and sets the prefix to be included with every log message. | ||
@@ -540,3 +588,3 @@ * | ||
| */ | ||
| withPrefix(string: string): ILogLayer; | ||
| withPrefix(string: string): This; | ||
| /** | ||
@@ -552,3 +600,3 @@ * Appends context data which will be included with | ||
| */ | ||
| withContext(context?: LogLayerContext): ILogLayer; | ||
| withContext(context?: LogLayerContext): This; | ||
| /** | ||
@@ -561,14 +609,2 @@ * Clears the context data. | ||
| /** | ||
| * Specifies metadata to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/metadata.html | Metadata Docs} | ||
| */ | ||
| withMetadata(metadata?: LogLayerMetadata): ILogBuilder; | ||
| /** | ||
| * Specifies an Error to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/error-handling.html | Error Handling Docs} | ||
| */ | ||
| withError(error: any): ILogBuilder; | ||
| /** | ||
| * Logs only the error object without a log message | ||
@@ -599,3 +635,3 @@ * | ||
| */ | ||
| child(): ILogLayer; | ||
| child(): This; | ||
| /** | ||
@@ -606,3 +642,3 @@ * Disables inclusion of context data in the print | ||
| */ | ||
| muteContext(): ILogLayer; | ||
| muteContext(): This; | ||
| /** | ||
@@ -613,3 +649,3 @@ * Enables inclusion of context data in the print | ||
| */ | ||
| unMuteContext(): ILogLayer; | ||
| unMuteContext(): This; | ||
| /** | ||
@@ -620,3 +656,3 @@ * Disables inclusion of metadata data in the print | ||
| */ | ||
| muteMetadata(): ILogLayer; | ||
| muteMetadata(): This; | ||
| /** | ||
@@ -627,3 +663,3 @@ * Enables inclusion of metadata data in the print | ||
| */ | ||
| unMuteMetadata(): ILogLayer; | ||
| unMuteMetadata(): This; | ||
| /** | ||
@@ -634,3 +670,3 @@ * Enables a specific log level | ||
| */ | ||
| enableIndividualLevel(logLevel: LogLevelType): ILogLayer; | ||
| enableIndividualLevel(logLevel: LogLevelType): This; | ||
| /** | ||
@@ -641,3 +677,3 @@ * Disables a specific log level | ||
| */ | ||
| disableIndividualLevel(logLevel: LogLevelType): ILogLayer; | ||
| disableIndividualLevel(logLevel: LogLevelType): This; | ||
| /** | ||
@@ -659,3 +695,3 @@ * Sets the minimum log level to be used by the logger. Only messages with | ||
| */ | ||
| setLevel(logLevel: LogLevelType): ILogLayer; | ||
| setLevel(logLevel: LogLevelType): This; | ||
| /** | ||
@@ -672,3 +708,3 @@ * Checks if a specific log level is enabled | ||
| */ | ||
| enableLogging(): ILogLayer; | ||
| enableLogging(): This; | ||
| /** | ||
@@ -679,3 +715,3 @@ * All logging inputs are dropped and stops sending logs to the logging library. | ||
| */ | ||
| disableLogging(): ILogLayer; | ||
| disableLogging(): This; | ||
| /** | ||
@@ -694,3 +730,3 @@ * Returns a logger instance for a specific transport | ||
| */ | ||
| withFreshTransports(transports: LogLayerTransport | Array<LogLayerTransport>): ILogLayer; | ||
| withFreshTransports(transports: LogLayerTransport | Array<LogLayerTransport>): This; | ||
| /** | ||
@@ -704,7 +740,7 @@ * Replaces all existing plugins with new ones. | ||
| */ | ||
| withFreshPlugins(plugins: Array<LogLayerPlugin>): ILogLayer; | ||
| withFreshPlugins(plugins: Array<LogLayerPlugin>): This; | ||
| /** | ||
| * Sets the context manager to use for managing context data. | ||
| */ | ||
| withContextManager(manager: IContextManager): ILogLayer; | ||
| withContextManager(manager: IContextManager): This; | ||
| /** | ||
@@ -717,3 +753,3 @@ * Gets the context manager used by the logger. | ||
| */ | ||
| withLogLevelManager(manager: ILogLevelManager): ILogLayer; | ||
| withLogLevelManager(manager: ILogLevelManager): This; | ||
| /** | ||
@@ -720,0 +756,0 @@ * Gets the log level manager used by the logger. |
+74
-38
@@ -289,7 +289,7 @@ //#region src/common.types.d.ts | ||
| */ | ||
| parentLogger: ILogLayer; | ||
| parentLogger: ILogLayer<any>; | ||
| /** | ||
| * The child logger instance | ||
| */ | ||
| childLogger: ILogLayer; | ||
| childLogger: ILogLayer<any>; | ||
| /** | ||
@@ -346,7 +346,7 @@ * The parent logger's context manager | ||
| */ | ||
| parentLogger: ILogLayer; | ||
| parentLogger: ILogLayer<any>; | ||
| /** | ||
| * The child logger instance | ||
| */ | ||
| childLogger: ILogLayer; | ||
| childLogger: ILogLayer<any>; | ||
| /** | ||
@@ -474,3 +474,3 @@ * The parent logger's log level manager | ||
| */ | ||
| interface ILogBuilder { | ||
| interface ILogBuilder<This = ILogBuilder<any>> { | ||
| /** | ||
@@ -505,3 +505,3 @@ * Sends a log message to the logging library under an info log level. | ||
| */ | ||
| withMetadata(metadata?: LogLayerMetadata): ILogBuilder; | ||
| withMetadata(metadata?: LogLayerMetadata): This; | ||
| /** | ||
@@ -512,3 +512,3 @@ * Specifies an Error to include with the log message | ||
| */ | ||
| withError(error: any): ILogBuilder; | ||
| withError(error: any): This; | ||
| /** | ||
@@ -519,3 +519,3 @@ * Enable sending logs to the logging library. | ||
| */ | ||
| enableLogging(): ILogBuilder; | ||
| enableLogging(): This; | ||
| /** | ||
@@ -526,3 +526,3 @@ * All logging inputs are dropped and stops sending logs to the logging library. | ||
| */ | ||
| disableLogging(): ILogBuilder; | ||
| disableLogging(): This; | ||
| } | ||
@@ -533,4 +533,52 @@ /** | ||
| */ | ||
| interface ILogLayer extends ILogBuilder { | ||
| interface ILogLayer<This = ILogLayer<any>> { | ||
| /** | ||
| * Sends a log message to the logging library under an info log level. | ||
| */ | ||
| info(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the warn log level | ||
| */ | ||
| warn(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the error log level | ||
| */ | ||
| error(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the debug log level | ||
| */ | ||
| debug(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the trace log level | ||
| */ | ||
| trace(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Sends a log message to the logging library under the fatal log level | ||
| */ | ||
| fatal(...messages: MessageDataType[]): void; | ||
| /** | ||
| * Specifies metadata to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/metadata.html | Metadata Docs} | ||
| */ | ||
| withMetadata(metadata?: LogLayerMetadata): ILogBuilder<any>; | ||
| /** | ||
| * Specifies an Error to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/error-handling.html | Error Handling Docs} | ||
| */ | ||
| withError(error: any): ILogBuilder<any>; | ||
| /** | ||
| * Enable sending logs to the logging library. | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/basic-logging.html#enabling-disabling-logging | Enabling/Disabling Logging Docs} | ||
| */ | ||
| enableLogging(): This; | ||
| /** | ||
| * All logging inputs are dropped and stops sending logs to the logging library. | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/basic-logging.html#enabling-disabling-logging | Enabling/Disabling Logging Docs} | ||
| */ | ||
| disableLogging(): This; | ||
| /** | ||
| * Calls child() and sets the prefix to be included with every log message. | ||
@@ -540,3 +588,3 @@ * | ||
| */ | ||
| withPrefix(string: string): ILogLayer; | ||
| withPrefix(string: string): This; | ||
| /** | ||
@@ -552,3 +600,3 @@ * Appends context data which will be included with | ||
| */ | ||
| withContext(context?: LogLayerContext): ILogLayer; | ||
| withContext(context?: LogLayerContext): This; | ||
| /** | ||
@@ -561,14 +609,2 @@ * Clears the context data. | ||
| /** | ||
| * Specifies metadata to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/metadata.html | Metadata Docs} | ||
| */ | ||
| withMetadata(metadata?: LogLayerMetadata): ILogBuilder; | ||
| /** | ||
| * Specifies an Error to include with the log message | ||
| * | ||
| * @see {@link https://loglayer.dev/logging-api/error-handling.html | Error Handling Docs} | ||
| */ | ||
| withError(error: any): ILogBuilder; | ||
| /** | ||
| * Logs only the error object without a log message | ||
@@ -599,3 +635,3 @@ * | ||
| */ | ||
| child(): ILogLayer; | ||
| child(): This; | ||
| /** | ||
@@ -606,3 +642,3 @@ * Disables inclusion of context data in the print | ||
| */ | ||
| muteContext(): ILogLayer; | ||
| muteContext(): This; | ||
| /** | ||
@@ -613,3 +649,3 @@ * Enables inclusion of context data in the print | ||
| */ | ||
| unMuteContext(): ILogLayer; | ||
| unMuteContext(): This; | ||
| /** | ||
@@ -620,3 +656,3 @@ * Disables inclusion of metadata data in the print | ||
| */ | ||
| muteMetadata(): ILogLayer; | ||
| muteMetadata(): This; | ||
| /** | ||
@@ -627,3 +663,3 @@ * Enables inclusion of metadata data in the print | ||
| */ | ||
| unMuteMetadata(): ILogLayer; | ||
| unMuteMetadata(): This; | ||
| /** | ||
@@ -634,3 +670,3 @@ * Enables a specific log level | ||
| */ | ||
| enableIndividualLevel(logLevel: LogLevelType): ILogLayer; | ||
| enableIndividualLevel(logLevel: LogLevelType): This; | ||
| /** | ||
@@ -641,3 +677,3 @@ * Disables a specific log level | ||
| */ | ||
| disableIndividualLevel(logLevel: LogLevelType): ILogLayer; | ||
| disableIndividualLevel(logLevel: LogLevelType): This; | ||
| /** | ||
@@ -659,3 +695,3 @@ * Sets the minimum log level to be used by the logger. Only messages with | ||
| */ | ||
| setLevel(logLevel: LogLevelType): ILogLayer; | ||
| setLevel(logLevel: LogLevelType): This; | ||
| /** | ||
@@ -672,3 +708,3 @@ * Checks if a specific log level is enabled | ||
| */ | ||
| enableLogging(): ILogLayer; | ||
| enableLogging(): This; | ||
| /** | ||
@@ -679,3 +715,3 @@ * All logging inputs are dropped and stops sending logs to the logging library. | ||
| */ | ||
| disableLogging(): ILogLayer; | ||
| disableLogging(): This; | ||
| /** | ||
@@ -694,3 +730,3 @@ * Returns a logger instance for a specific transport | ||
| */ | ||
| withFreshTransports(transports: LogLayerTransport | Array<LogLayerTransport>): ILogLayer; | ||
| withFreshTransports(transports: LogLayerTransport | Array<LogLayerTransport>): This; | ||
| /** | ||
@@ -704,7 +740,7 @@ * Replaces all existing plugins with new ones. | ||
| */ | ||
| withFreshPlugins(plugins: Array<LogLayerPlugin>): ILogLayer; | ||
| withFreshPlugins(plugins: Array<LogLayerPlugin>): This; | ||
| /** | ||
| * Sets the context manager to use for managing context data. | ||
| */ | ||
| withContextManager(manager: IContextManager): ILogLayer; | ||
| withContextManager(manager: IContextManager): This; | ||
| /** | ||
@@ -717,3 +753,3 @@ * Gets the context manager used by the logger. | ||
| */ | ||
| withLogLevelManager(manager: ILogLevelManager): ILogLayer; | ||
| withLogLevelManager(manager: ILogLevelManager): This; | ||
| /** | ||
@@ -720,0 +756,0 @@ * Gets the log level manager used by the logger. |
+1
-1
| { | ||
| "name": "@loglayer/shared", | ||
| "description": "Shared utilities and types for loglayer packages.", | ||
| "version": "3.0.1", | ||
| "version": "3.1.0-alpha-0.0", | ||
| "type": "module", | ||
@@ -6,0 +6,0 @@ "main": "./dist/index.cjs", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
62098
4.12%837
4.49%1
Infinity%