Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CeeblueTV/wrts-client/llms.txt

Use this file to discover all available pages before exploring further.

The WebRTS client uses the Log Engine from @ceeblue/web-utils for all internal diagnostics. The library re-exports the entire web-utils namespace as utils, so you can reach log and LogLevel without installing a separate package.

Log Levels

There are four log levels, ordered from least to most verbose:

LogLevel.ERROR

Unrecoverable errors that stop the current operation. Enabled by default.

LogLevel.WARN

Errors or unexpected states that do not interrupt the current operation.

LogLevel.INFO

Informational messages at a frequency acceptable in production environments.

LogLevel.DEBUG

High-frequency messages intended for development-time troubleshooting only.

Default Behaviour

By default, only LogLevel.ERROR is enabled. This is set in the library entry point (index.ts) at load time:
log.level = LogLevel.ERROR; // set on import
No configuration is required if you only want fatal errors.

Setting the Log Level

import { utils } from '@ceeblue/wrts-client';
const { log, LogLevel } = utils;

// Show errors, warnings, and info messages
log.level = LogLevel.INFO;
Setting the level to LogLevel.INFO includes all messages at INFO, WARN, and ERROR priority — each level is cumulative downward.

Disabling or Enabling All Logging

import { utils } from '@ceeblue/wrts-client';
const { log } = utils;

// Suppress all log output
log.level = false;

// Show every log message (equivalent to DEBUG)
log.level = true;

Production Monitoring Example

LogLevel.INFO is a good choice for production. It surfaces connection events, track changes, buffer transitions, and live-edge seeks without flooding the console with per-frame debug data.
import { Player, utils } from '@ceeblue/wrts-client';
const { log, LogLevel } = utils;

// Enable INFO-level logging for production monitoring
log.level = LogLevel.INFO;

const player = new Player(videoElement);
player.start({ endPoint: 'https://<hostname>/wrts/out+<stream-id>/index.json' });
Use LogLevel.DEBUG only during development or active troubleshooting. Debug output is emitted at very high frequency (on every media sample) and will significantly impact console performance in a browser.

Advanced Log Engine Features

Beyond basic level filtering, the Log Engine from @ceeblue/web-utils supports:
  • Subscription — attach a listener to receive log entries as structured objects
  • Interception — intercept and transform log calls before they are written
  • Redirection — send log output to a custom sink (e.g., a remote logging service)
  • Redefinition — replace the default console writer entirely
See the full ILog interface documentation for details.

Build docs developers (and LLMs) love