ILogService

class wvc.ILogService()

Stateless service interface for log propagation.

Acts as a bridge between the web viewer and consumer code. Each call emits a hoops-log-service-entry event containing an LogEntry. The service does not store entries — consumers are responsible for persistence, display, or forwarding.

Examples

const logService = getService<ILogService>('LogService');
logService.addEventListener('hoops-log-service-entry', (e) => {
  console.log(e.detail);
});
logService.warn('Connection unstable', { latency: 350 });

Index

Properties

Methods

Properties

wvc.ILogService.serviceName

inherited

serviceName: ServiceName

Methods

wvc.ILogService.debug()
debug(message: string, context: Record): void

Emits a debug-level log entry.

Parameters

message: string

Human-readable debug message

context: Record

Optional structured context

Returns: void

wvc.ILogService.error()
error(message: string, context: Record): void

Emits an error-level log entry.

Parameters

message: string

Human-readable error message

context: Record

Optional structured context

Returns: void

wvc.ILogService.info()
info(message: string, context: Record): void

Emits an info-level log entry.

Parameters

message: string

Human-readable informational message

context: Record

Optional structured context

Returns: void

wvc.ILogService.log()
log(entry: Omit): void

Emits a log entry with the given level, message, and optional context.

Parameters

entry: Omit

Log entry without the timestamp (added automatically)

Returns: void

wvc.ILogService.warn()
warn(message: string, context: Record): void

Emits a warn-level log entry.

Parameters

message: string

Human-readable warning message

context: Record

Optional structured context

Returns: void