Loggical API Documentation v1.0.1
Loggical API Documentation / BaseTransport
Abstract Class: BaseTransport
Defined in: transports/transport.interface.ts:17
Base transport class with common functionality
Extended by
Implements
Constructors
Constructor
new BaseTransport(options: TransportOptions): BaseTransport;Defined in: transports/transport.interface.ts:21
Parameters
| Parameter | Type |
|---|---|
options | TransportOptions |
Returns
BaseTransport
Properties
name
abstract readonly name: string;Defined in: transports/transport.interface.ts:18
Unique name for this transport (for debugging/identification)
Implementation of
options
protected options: TransportOptions;Defined in: transports/transport.interface.ts:19
Methods
shouldWrite()
protected shouldWrite(
level: LogLevelType,
message: string,
metadata: LogMetadata): boolean;Defined in: transports/transport.interface.ts:31
Check if this message should be processed by this transport
Parameters
| Parameter | Type |
|---|---|
level | LogLevelType |
message | string |
metadata | LogMetadata |
Returns
boolean
safeWrite()
safeWrite(formattedMessage: string, metadata: LogMetadata): Promise<void>;Defined in: transports/transport.interface.ts:52
Write with filtering and error handling
Parameters
| Parameter | Type |
|---|---|
formattedMessage | string |
metadata | LogMetadata |
Returns
Promise<void>
write()
abstract write(formattedMessage: string, metadata: LogMetadata): void | Promise<void>;Defined in: transports/transport.interface.ts:66
Write a formatted log message to this transport
Parameters
| Parameter | Type | Description |
|---|---|---|
formattedMessage | string | The complete formatted log message |
metadata | LogMetadata | Additional metadata about the log entry |
Returns
void | Promise<void>
Implementation of
configure()
configure(options: Record<string, unknown>): void;Defined in: transports/transport.interface.ts:71
Configure or reconfigure this transport
Parameters
| Parameter | Type | Description |
|---|---|---|
options | Record<string, unknown> | Transport-specific configuration options |
Returns
void
Implementation of
getStatus()
getStatus(): Record<string, unknown>;Defined in: transports/transport.interface.ts:75
Get current configuration/status of this transport Useful for debugging and monitoring
Returns
Record<string, unknown>
