Loading...
Skip to main content

Class: CombinedLogger

core/log.CombinedLogger

An implementation of LogImplementation that logs to multiple underlying LogImplementations.

Hierarchy

Constructors

constructor

new CombinedLogger(loggers)

Parameters

NameType
loggersLogImplementation[]

Overrides

LogImplementation.constructor

Defined in

ai-jsx/src/core/log.ts:163

Properties

loggedExceptions

Protected Readonly loggedExceptions: WeakMap<object, boolean>

Inherited from

LogImplementation.loggedExceptions

Defined in

ai-jsx/src/core/log.ts:26

Methods

log

log(...args): void

Parameters

NameTypeDescription
...args[level: LogLevel, element: Element<any>, renderId: string, metadataOrMessage: string | object, message?: string]The logging level.

Returns

void

Overrides

LogImplementation.log

Defined in

ai-jsx/src/core/log.ts:167


logException

logException(...args): void

Logs exceptions thrown during an element's render. By default invokes log with level "error" for the element that threw the exception and level "trace" for elements through which the exception propagated. This will not be invoked for ErrorBoundary components that handle errors from their children.

Parameters

NameTypeDescription
...args[element: Element<object>, renderId: string, exception: unknown]The element from which the exception originated or through which the exception was propagated.

Returns

void

Overrides

LogImplementation.logException

Defined in

ai-jsx/src/core/log.ts:171


setAttribute

setAttribute(...args): void

Sets an attribute to be associated with the rendering of a particular element.

Parameters

NameType
...args[_element: Element<any>, _renderId: string, _key: string, _value: string]

Returns

void

Overrides

LogImplementation.setAttribute

Defined in

ai-jsx/src/core/log.ts:175