Skip to main content

Class: LoggerAdapter

Defined in: electron/services/database/serviceFactory.ts:28

Adapter for the logger to implement Logger interface.

Adapts the monitorLogger instance to match the Logger interface required by database services, providing a consistent logging interface across different components while maintaining type safety.

See​

Logger for the interface this class implements

Implements​

Constructors​

Constructor​

new LoggerAdapter(logger: BaseLogger): LoggerAdapter;

Defined in: electron/services/database/serviceFactory.ts:31

Parameters​

logger​

BaseLogger

Returns​

LoggerAdapter

Properties​

logger​

private readonly logger: BaseLogger;

Defined in: electron/services/database/serviceFactory.ts:29

Methods​

debug()​

debug(message: string, ...args: unknown[]): void;

Defined in: electron/services/database/serviceFactory.ts:35

Log debug information for development and troubleshooting.

Parameters​

message​

string

The debug message to log

args​

...unknown[]

Additional arguments for context

Returns​

void

Implementation of​

Logger.debug;

error()​

error(
message: string,
error?: unknown, ...
args: unknown[]): void;

Defined in: electron/services/database/serviceFactory.ts:39

Log error messages with optional error objects.

Parameters​

message​

string

The error message to log

error?​

unknown

Optional error object or additional context

args​

...unknown[]

Additional arguments for context

Returns​

void

Remarks​

When an Error object is provided, the logger should extract and format the error message and stack trace appropriately for debugging.

Implementation of​

Logger.error;

info()​

info(message: string, ...args: unknown[]): void;

Defined in: electron/services/database/serviceFactory.ts:43

Log general informational messages.

Parameters​

message​

string

The information message to log

args​

...unknown[]

Additional arguments for context

Returns​

void

Implementation of​

Logger.info;

warn()​

warn(message: string, ...args: unknown[]): void;

Defined in: electron/services/database/serviceFactory.ts:47

Log warning messages for potential issues.

Parameters​

message​

string

The warning message to log

args​

...unknown[]

Additional arguments for context

Returns​

void

Implementation of​

Logger.warn;