Skip to content

Logger

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/utils/logger.ts

Methods

MethodSignatureReturns
setStagesetStage(stage: string)void
clearStageclearStage()void
debugdebug(message: string, data: Record<string, unknown>)void
infoinfo(message: string, data: Record<string, unknown>)void
warnwarn(message: string, data: Record<string, unknown>)void
errorerror(message: string, error: Error, data: Record<string, unknown>)void
stageStartstageStart(stage: string, details: Record<string, unknown>)void
stageCompletestageComplete(stage: string, duration: number, details: Record<string, unknown>)void
stageFailedstageFailed(stage: string, error: Error, details: Record<string, unknown>)void
tokenUsagetokenUsage(stage: string, inputTokens: number, outputTokens: number, model: string)void
childchild(prefix: string)Logger

Where it refuses work

  • Logger stops the work with an early return when this.config.silent.
  • Logger stops the work with an early return when !this.shouldLog(entry.level).

Was this page helpful?

Download as PDF