LoggerInterface
Upgather SDK / LoggerInterface
Interface: LoggerInterface
Defined in: lib/utils/logger/LoggerInterface.ts:25
Standard logging interface that allows dependency injection of custom loggers. Implementations can range from simple console loggers to sophisticated logging libraries like Winston or Pino.
Example
import { LoggerInterface } from '@upgather/upgather-sdk';
class MyLogger implements LoggerInterface {
debug(message: string, ...meta: any[]) {
console.debug(`[DEBUG] ${message}`, ...meta);
}
info(message: string, ...meta: any[]) {
console.info(`[INFO] ${message}`, ...meta);
}
warn(message: string, ...meta: any[]) {
console.warn(`[WARN] ${message}`, ...meta);
}
error(message: string, ...meta: any[]) {
console.error(`[ERROR] ${message}`, ...meta);
}
}
Methods
debug()
debug(
message, ...meta):void
Defined in: lib/utils/logger/LoggerInterface.ts:32
Log debug-level messages for detailed troubleshooting information.
Parameters
message
string
The log message
meta
...any[]
Additional metadata to include with the log entry
Returns
void
error()
error(
message, ...meta):void
Defined in: lib/utils/logger/LoggerInterface.ts:56
Log error messages for error events that might still allow the application to continue.
Parameters
message
string
The log message
meta
...any[]
Additional metadata to include with the log entry
Returns
void
info()
info(
message, ...meta):void
Defined in: lib/utils/logger/LoggerInterface.ts:40
Log informational messages about normal application operations.
Parameters
message
string
The log message
meta
...any[]
Additional metadata to include with the log entry
Returns
void
warn()
warn(
message, ...meta):void
Defined in: lib/utils/logger/LoggerInterface.ts:48
Log warning messages for potentially harmful situations.
Parameters
message
string
The log message
meta
...any[]
Additional metadata to include with the log entry
Returns
void