@nowarajs/logger
    Preparing search index...

    Class FileLoggerSink<TLogObject>

    FileLoggerSink implements LoggerSink to provide logging functionality to the file system. Uses Bun.FileSink for efficient buffered appending (works in worker context).

    Type Parameters

    • TLogObject = unknown

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    path: string

    Methods

    • Closes the sink and flushes any pending logs. This method is called when the logger is closing to ensure all resources are properly released. Optional - implement this if your sink needs cleanup (e.g., closing file handles, database connections).

      Returns Promise<void>

    • Logs a message with the sink's implementation. If you want to create your own sink, you must implement this method and all imports must be in the form of dynamic imports.

      Parameters

      • level: LogLevels

        The log level at which the message should be logged.

      • timestamp: number

        The date at which the message was logged.

      • object: TLogObject

        The object to log.

      Returns void