Skip to content

LumberjackService

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:28

Service with programmatic API to pass logs to Lumberjack. Optionally supports a log payload.

Lumberjack passes the logs to the registered log drivers based on their configurations.

NOTE! Consider extending the LumberjackLogger or ScopedLumberjackLogger base classes to set up predefined loggers unless you need a programmatic API.

TPayload extends LumberjackLogPayload | void = void

new LumberjackService<TPayload>(): LumberjackService<TPayload>

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:37

LumberjackService<TPayload>

log(lumberjackLog): void

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:49

Pass a log to Lumberjack which will be forwarded to the registered log drivers based on their configurations.

NOTE! It’s recommended to use LumberjackLogBuilder to create the log.

LumberjackLog<TPayload>

The Lumberjack log. Optionally supports a log payload.

void


logCritical(message, payload?, scope?): void

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:63

Pass a critical log to Lumberjack which will be forwarded to the registered log drivers based on their configurations.

string

Log message, for example describing an event that happened.

TPayload

An optional payload to add to the log.

string

An optional scope to add to the LumberjackLog.

void


logDebug(message, payload?, scope?): void

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:135

Pass a debug log to Lumberjack which will be forwarded to the registered log drivers based on their configurations.

string

Log message, for example describing an event that happened.

TPayload

An optional payload to add to the log.

string

An optional scope to add to the LumberjackLog.

void


logError(message, payload?, scope?): void

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:81

Pass an error log to Lumberjack which will be forwarded to the registered log drivers based on their configurations.

string

Log message, for example describing an event that happened.

TPayload

An optional payload to add to the log.

string

An optional scope to add to the LumberjackLog.

void


logInfo(message, payload?, scope?): void

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:117

Pass an info log to Lumberjack which will be forwarded to the registered log drivers based on their configurations.

string

Log message, for example describing an event that happened.

TPayload

An optional payload to add to the log.

string

An optional scope to add to the LumberjackLog.

void


logTrace(message, payload?, scope?): void

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:153

Pass a trace log to Lumberjack which will be forwarded to the registered log drivers based on their configurations.

string

Log message, for example describing an event that happened.

TPayload

An optional payload to add to the log.

string

An optional scope to add to the LumberjackLog.

void


logWarning(message, payload?, scope?): void

Defined in: packages/ngworker/lumberjack/src/lib/logging/lumberjack.service.ts:99

Pass a warning log to Lumberjack which will be forwarded to the registered log drivers based on their configurations.

string

Log message, for example describing an event that happened.

TPayload

An optional payload to add to the log.

string

An optional scope to add to the LumberjackLog.

void