Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LogManager

Provides log manager that can be used for service logging.

Hierarchy

  • LogManager

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

  • new LogManager(serviceName: string, path?: undefined | string, config?: LMConfig): LogManager
  • Provides log manager that can be used for service logging.

    Parameters

    • serviceName: string

      Name of service. Cant be longer than 8 symbols.

    • Optional path: undefined | string

      Way to log dir.

    • Optional config: LMConfig

      Log manager configuration.

    Returns LogManager

    LogManager

Properties

Private instances

instances: ServiceLogger[] = []

Array of loggers.

Private path

path: string

Path to log dir.

Private serviceName

serviceName: string

Service name.

Methods

getLogger

  • Generates and returns logger for instance.

    Parameters

    • Optional instanceName: undefined | string

      Name of instance. If not provided - main instance.

    • Optional config: LoggerConfig

      Logger configuration.

    Returns ServiceLogger

    ServiceLogger

mute

  • mute(): void
  • Mutes all loggers of service.

    Returns void

unmute

  • unmute(): void
  • Unmutes all loggers of service.

    Returns void

Object literals

Private config

config: object

Log manager configuration.

showService

showService: true = true

Generated using TypeDoc