Skip to content

Documentation / @tenancy-node/core / ContextualLogger

Class: ContextualLogger ​

Defined in: core/src/observability/contextual-logger.ts:7

Logger que agrega tenantId del contexto actual a cada línea, así cualquier log de la aplicación se puede filtrar por tenant.

Implements ​

Constructors ​

Constructor ​

new ContextualLogger(inner, currentTenantId): ContextualLogger

Defined in: core/src/observability/contextual-logger.ts:13

Parameters ​

inner ​

Logger

currentTenantId ​

() => string | null

Returns ​

ContextualLogger

Properties ​

debug ​

readonly debug: LogFn

Defined in: core/src/observability/contextual-logger.ts:8

Implementation of ​

Logger.debug


error ​

readonly error: LogFn

Defined in: core/src/observability/contextual-logger.ts:11

Implementation of ​

Logger.error


info ​

readonly info: LogFn

Defined in: core/src/observability/contextual-logger.ts:9

Implementation of ​

Logger.info


warn ​

readonly warn: LogFn

Defined in: core/src/observability/contextual-logger.ts:10

Implementation of ​

Logger.warn

Methods ​

child() ​

child(bindings): Logger

Defined in: core/src/observability/contextual-logger.ts:23

Parameters ​

bindings ​

Record<string, unknown>

Returns ​

Logger

Implementation of ​

Logger.child

Publicado bajo la licencia MIT.