Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ServiceLogger

Logger for service instances.

Hierarchy

  • ServiceLogger

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

  • new ServiceLogger(serviceName: string, instanceName: string, path?: undefined | string, face?: undefined | string, config?: LoggerConfig): ServiceLogger
  • Creates and returns logger

    Parameters

    • serviceName: string

      Name of service. Cant be longer than 8 characters.

    • instanceName: string

      Name of instance. Cant be longer than 8 characters.

    • Optional path: undefined | string

      Path to log dir.

    • Optional face: undefined | string
    • Optional config: LoggerConfig

      Logger configuration.

    Returns ServiceLogger

    ServiceLogger

Properties

Private face

face: string = ""
beta

face

Private instanceName

instanceName: string = ""

Name of instance. Cant be longer than 8 characters.

Private logger

logger: Logger | null = null

logger.

Private path

path: string = "logs"

Path to log dir.

Private serviceName

serviceName: string = ""

Name of service. Cant be longer than 8 characters.

Methods

debug

  • debug(message: any): void
  • Make log with debug loglevel.

    Parameters

    • message: any

      Log message text.

    Returns void

err

  • err(message: any): void
  • Make log with err loglevel.

    Parameters

    • message: any

      Log message text.

    Returns void

info

  • info(message: any): void
  • Make log with info loglevel.

    Parameters

    • message: any

      Log message text.

    Returns void

silent

  • silent(mod: boolean): void
  • Mute or unmute logger.

    Parameters

    • mod: boolean

      true: mute, false: unmute.

    Returns void

warn

  • warn(message: any): void
  • Make log with warn loglevel.

    Parameters

    • message: any

      Log message text.

    Returns void

Object literals

Private config

config: object

Logger configuration.

showService

showService: true = true

Show service name in start of log message

silent

silent: false = false

Mute instance logger

Generated using TypeDoc