LOGGER
@tsed/di
Usage
typescript
import { LOGGER } from "@tsed/di";Overview
ts
const LOGGER: unique symbol;
export type LOGGER = DILogger;Description
Injection token for the DI logger service.
Use this symbol to inject the configured logger instance into your services.
Usage
typescript
import {Injectable, Inject, LOGGER} from "@tsed/di";
@Injectable()
class MyService {
@Inject(LOGGER)
logger: LOGGER;
doSomething() {
this.logger.info("Doing something");
}
}