Skip to content

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

ts
readonly name: string;

Defined in: types/transport.types.ts:47

Unique name for this transport (for debugging/identification)

Methods

write()

ts
write(formattedMessage: string, metadata: LogMetadata): void | Promise<void>;

Defined in: types/transport.types.ts:54

Write a formatted log message to this transport

Parameters

ParameterTypeDescription
formattedMessagestringThe complete formatted log message
metadataLogMetadataAdditional metadata about the log entry

Returns

void | Promise<void>


configure()?

ts
optional configure(options: Record<string, unknown>): void;

Defined in: types/transport.types.ts:60

Configure or reconfigure this transport

Parameters

ParameterTypeDescription
optionsRecord<string, unknown>Transport-specific configuration options

Returns

void


close()?

ts
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()?

ts
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>

Released under the MIT License.