Skip to main content

Interface: GlobalLoggerConfig

Defined in: src/interfaces.ts:437

Global logger configuration with advanced formatting and file output options. Extends basic LoggerConfig with application-specific settings.

Example​

const loggerConfig: GlobalLoggerConfig = {
enableLogger: true,
logLevel: 'info',
appName: 'my-temporal-app',
logToFile: true,
logFilePath: './logs/temporal.log',
formatter: (level, message, context, timestamp) =>
`[${timestamp}] ${level.toUpperCase()} [${context}]: ${message}`
};

Extends​

Properties​

appName?​

optional appName?: string

Defined in: src/interfaces.ts:438


enableLogger?​

optional enableLogger?: boolean

Defined in: src/interfaces.ts:457

Inherited from​

LoggerConfig.enableLogger


formatter?​

optional formatter?: (level, message, context, timestamp) => string

Defined in: src/interfaces.ts:439

Parameters​

level​

string

message​

string

context​

string

timestamp​

string

Returns​

string


logFilePath?​

optional logFilePath?: string

Defined in: src/interfaces.ts:441


logLevel?​

optional logLevel?: LogLevel

Defined in: src/interfaces.ts:458

Inherited from​

LoggerConfig.logLevel


logToFile?​

optional logToFile?: boolean

Defined in: src/interfaces.ts:440


muteErrors?​

optional muteErrors?: boolean

Defined in: src/interfaces.ts:465

When true, suppresses error-level log output and prevents service methods from throwing on operational failures (they return structured error results instead).

Default​

false

Inherited from​

LoggerConfig.muteErrors


redactKeys?​

optional redactKeys?: string[]

Defined in: src/interfaces.ts:471

Extra object keys whose values are replaced with [REDACTED] when the library logs structured data. Credentials, TLS material and payload bodies are always redacted; see DEFAULT_REDACT_KEYS. Matching ignores case, - and _.

Inherited from​

LoggerConfig.redactKeys