Fake Mirrors
    Preparing search index...

    Class PinoLogger

    Pino-based logger implementation.

    Uses the high-performance Pino library as the backend.

    https://getpino.io - Pino logger documentation

    Depends:

    import { DIContainer } from '@famir/common'
    import { PinoLogger } from '@famir/logger'

    // Get container singleton
    const container = DIContainer.getInstance()

    // Register dependency in container
    PinoLogger.register(container, { appName: 'test' })
    import { DIContainer } from '@famir/common'
    import { LOGGER, Logger } from '@famir/domain'

    // Get container singleton
    const container = DIContainer.getInstance()

    // Resolve dependency from container
    const logger = container.resolve<Logger>(LOGGER)

    // Log some messages
    logger.debug(`Simple debug log message`)
    logger.info(`Log message with data`, { foo: 'bar' })

    Implements

    • Logs a debug message — detailed information for debugging.

      Parameters

      • msg: string

        The log message.

      • Optionaldata: LoggerData

        Optional structured data to attach to the log entry.

      Returns void

    • Logs an error message — errors that can be handled.

      Parameters

      • msg: string

        The log message.

      • Optionaldata: LoggerData

        Optional structured data to attach to the log entry.

      Returns void

    • Logs a fatal message — unrecoverable errors causing application shutdown.

      Parameters

      • msg: string

        The log message.

      • Optionaldata: LoggerData

        Optional structured data to attach to the log entry.

      Returns void

    • Logs an info message — general application events.

      Parameters

      • msg: string

        The log message.

      • Optionaldata: LoggerData

        Optional structured data to attach to the log entry.

      Returns void

    • Logs a trace message — application flow tracing.

      Parameters

      • msg: string

        The log message.

      • Optionaldata: LoggerData

        Optional structured data to attach to the log entry.

      Returns void

    • Logs a warning message — potentially problematic situations.

      Parameters

      • msg: string

        The log message.

      • Optionaldata: LoggerData

        Optional structured data to attach to the log entry.

      Returns void

    • Registers the logger as a singleton in the DI container.

      Parameters

      Returns void