Skip to content

@seydx/rtsp / Logger

Interface: Logger

Defined in: types.ts:20

Minimal logger shape used throughout the relay.

Every method is optional, so callers can pass a partial console-like object (or omit it entirely) and the relay will only invoke the methods that are present. This keeps integration with existing logging frameworks trivial: pass console for everything, a subset for selective output, or nothing to stay silent.

Example

typescript
import { Relay } from '@seydx/rtsp';

const logger = { warn: console.warn, error: console.error };
const relay = new Relay({ source, logger });

Properties

debug?

optional debug?: (...args) => void

Defined in: types.ts:53

Verbose diagnostic logging.

Receives an arbitrary list of arguments, mirroring console.debug. Emits fine-grained detail intended for troubleshooting; safe to leave unset in production.

Parameters

args

...unknown[]

Returns

void


error?

optional error?: (...args) => void

Defined in: types.ts:44

Error-level logging.

Receives an arbitrary list of arguments, mirroring console.error. Used for failures the relay could not recover from on its own.

Parameters

args

...unknown[]

Returns

void


log?

optional log?: (...args) => void

Defined in: types.ts:27

General-purpose informational logging.

Receives an arbitrary list of arguments, mirroring console.log. Invoked for routine, non-error events the relay wants to surface.

Parameters

args

...unknown[]

Returns

void


warn?

optional warn?: (...args) => void

Defined in: types.ts:36

Warning-level logging.

Receives an arbitrary list of arguments, mirroring console.warn. Used for recoverable conditions that may indicate a problem (e.g. a sink falling behind or a retried connection).

Parameters

args

...unknown[]

Returns

void