Skip to content

contextLogger

@tsed/di

Usage

typescript
import { contextLogger } from "@tsed/di";

See /packages/di/src/types/node/fn/logger.ts.

Overview

ts
function contextLogger(): import("../index.js").ContextLogger;

Description

Get the current logger instance. If the logger() function is invoked in Request context, it will return the logger instance attached to the request context. Otherwise, it will return the logger instance attached to the DI context.

Released under the MIT License.