ILogger interface

Interfaz de registrador personalizada para la observabilidad del Agente 365 Implementa esta interfaz para admitir los back-end de registro

Métodos

error(string, unknown[])

Registrar un mensaje de error

event(ExporterEventNames, boolean, number, string, Record<string, string>)

Registro de un evento con parámetros estandarizados

info(string, unknown[])

Registrar un mensaje informativo

warn(string, unknown[])

Registrar un mensaje de advertencia

Detalles del método

error(string, unknown[])

Registrar un mensaje de error

function error(message: string, args: unknown[])

Parámetros

message

string

Mensaje de registro

args

unknown[]

Argumentos opcionales que se van a incluir en el registro

event(ExporterEventNames, boolean, number, string, Record<string, string>)

Registro de un evento con parámetros estandarizados

function event(eventType: ExporterEventNames, isSuccess: boolean, durationMs: number, message?: string, details?: Record<string, string>)

Parámetros

eventType
ExporterEventNames

Nombre de evento estandarizado de la enumeración ExporterEventNames (por ejemplo, ExporterEventNames.EXPORT)

isSuccess

boolean

Si la operación o el evento se realizaron correctamente

durationMs

number

Duración de la operación o evento en milisegundos

message

string

Mensaje opcional o detalles adicionales sobre el evento, especialmente útil para errores o errores

details

Record<string, string>

Pares clave-valor opcionales con contexto adicional (por ejemplo, correlationId, tenantId, agentId, etc.)

info(string, unknown[])

Registrar un mensaje informativo

function info(message: string, args: unknown[])

Parámetros

message

string

Mensaje de registro

args

unknown[]

Argumentos opcionales que se van a incluir en el registro

warn(string, unknown[])

Registrar un mensaje de advertencia

function warn(message: string, args: unknown[])

Parámetros

message

string

Mensaje de registro

args

unknown[]

Argumentos opcionales que se van a incluir en el registro