Loggical API Documentation v1.0.1
Loggical API Documentation / Transport
Interface: Transport
Defined in: types/transport.types.ts:43
Base transport interface that all transports must implement
Properties
name
readonly name: string;Defined in: types/transport.types.ts:47
Unique name for this transport (for debugging/identification)
Methods
write()
write(formattedMessage: string, metadata: LogMetadata): void | Promise<void>;Defined in: types/transport.types.ts:54
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>
configure()?
optional configure(options: Record<string, unknown>): void;Defined in: types/transport.types.ts:60
Configure or reconfigure this transport
Parameters
| Parameter | Type | Description |
|---|---|---|
options | Record<string, unknown> | Transport-specific configuration options |
Returns
void
close()?
optional close(): void | Promise<void>;Defined in: types/transport.types.ts:66
Cleanup and close this transport Called when logger is destroyed or transport is removed
Returns
void | Promise<void>
getStatus()?
optional getStatus(): Record<string, unknown>;Defined in: types/transport.types.ts:72
Get current configuration/status of this transport Useful for debugging and monitoring
Returns
Record<string, unknown>
