Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Logger

Index

Constructors

  • new Logger(moduleName: string): Logger
  • Parameters

    • moduleName: string

    Returns Logger

Properties

moduleName: string
version: string = version
errors: typeof ErrorCode = ErrorCode
levels: typeof LogLevel = LogLevel

Methods

  • _log(logLevel: LogLevel, args: any[]): void
  • Parameters

    Returns void

  • assert(condition: any, message: string, code?: ErrorCode, params?: any): void
  • Parameters

    • condition: any
    • message: string
    • Optional code: ErrorCode
    • Optional params: any

    Returns void

  • assertArgument(condition: any, message: string, name: string, value: any): void
  • Parameters

    • condition: any
    • message: string
    • name: string
    • value: any

    Returns void

  • checkAbstract(target: any, kind: any): void
  • Parameters

    • target: any
    • kind: any

    Returns void

  • checkArgumentCount(count: number, expectedCount: number, message?: string): void
  • Parameters

    • count: number
    • expectedCount: number
    • Optional message: string

    Returns void

  • checkNew(target: any, kind: any): void
  • Parameters

    • target: any
    • kind: any

    Returns void

  • checkNormalize(message?: string): void
  • Parameters

    • Optional message: string

    Returns void

  • checkSafeUint53(value: number, message?: string): void
  • Parameters

    • value: number
    • Optional message: string

    Returns void

  • debug(...args: any[]): void
  • Parameters

    • Rest ...args: any[]

    Returns void

  • info(...args: any[]): void
  • Parameters

    • Rest ...args: any[]

    Returns void

  • makeError(message: string, code?: ErrorCode, params?: any): Error
  • Parameters

    • message: string
    • Optional code: ErrorCode
    • Optional params: any

    Returns Error

  • throwArgumentError(message: string, name: string, value: any): never
  • Parameters

    • message: string
    • name: string
    • value: any

    Returns never

  • throwError(message: string, code?: ErrorCode, params?: any): never
  • Parameters

    • message: string
    • Optional code: ErrorCode
    • Optional params: any

    Returns never

  • warn(...args: any[]): void
  • Parameters

    • Rest ...args: any[]

    Returns void

  • Parameters

    • version: string

    Returns Logger

  • Returns Logger

  • setCensorship(censorship: boolean, permanent?: boolean): void
  • Parameters

    • censorship: boolean
    • Optional permanent: boolean

    Returns void

  • setLogLevel(moduleName: string, logLevel: "DEBUG" | "INFO" | "WARNING" | "ERROR" | "OFF"): void
  • Parameters

    • moduleName: string
    • logLevel: "DEBUG" | "INFO" | "WARNING" | "ERROR" | "OFF"

    Returns void