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-entryevent containing anLogEntry. 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 });
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 messagecontext: Record
Optional structured contextReturns: void
-
wvc.ILogService.error() - error(message: string, context: Record): void
Emits an error-level log entry.
Parameters
message: string
Human-readable error messagecontext: Record
Optional structured contextReturns: void
-
wvc.ILogService.info() - info(message: string, context: Record): void
Emits an info-level log entry.
Parameters
message: string
Human-readable informational messagecontext: Record
Optional structured contextReturns: 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 messagecontext: Record
Optional structured contextReturns: void