import { createContainer } from "iti"
export interface Logger {
info: (msg: string) => void
warn: (msg: string) => void
error: (msg: string) => void
export class ConsoleLogger implements Logger {
info(msg: string): void {
console.log("Console Logger: ", msg)
warn(msg: string): void {}
error(msg: string): void {}
export class PinoLogger implements Logger {
info(msg: string): void {
console.log("Pino Logger: ", msg)
warn(msg: string): void {}
error(msg: string): void {}
export class PaymentService {
private readonly logger: Logger
constructor(_logger: Logger) {
this.logger.info("inversify logger info")
const root = createContainer()
process.env.NODE_ENV === "production"
paymentService: () => new PaymentService(ctx.logger),
const ps = root.congainers.paymentService