Skip to main content
Version: 4.x.x

LoggerManager


import { LoggerManager } from "@hyper-fetch/core"

Description

This class is used across the Hyper Fetch library to provide unified logging system with necessary setup per each client. We can set up the logging level based on available values. This manager enable to initialize the logging instance per individual module like Client, Request etc. Which can give you better feedback on the logging itself.

Defined in managers/logger/logger.manager.ts:11

Parameters

NameDetails

client

Required

Pick<ClientInstance, debug>

options

Optional

LoggerOptionsType

Properties

emitter

Description

Defined in managers/logger/logger.manager.ts:15

Type

EventEmitter

severity

Description

Defined in managers/logger/logger.manager.ts:13

Type

SeverityType

Methods

logger()

Description

Defined in managers/logger/logger.manager.ts:12

Return

(log: LogType) => void

init()

Preview

init(module)

Description

Defined in managers/logger/logger.manager.ts:26

Parameters

NameDetails

module

Required

string

Return

Record<LoggerLevelType, (message: LoggerMessageType, ...extra: LoggerMessageType[]) => void>

setSeverity()

Preview

setSeverity(severity)

Description

Defined in managers/logger/logger.manager.ts:22

Parameters

NameDetails

severity

Required

SeverityType

Return

void