rest-vir - v2.2.0
    Preparing search index...

    Type Alias ServerLogger

    A service logger. All internal service logs will go through this and endpoint implementations are also given the service's logger to use if they wish.

    type ServerLogger = {
        error: (error: Error) => void;
        info: (...args: ReadonlyArray<unknown>) => void;
    }
    Index

    Properties

    Properties

    error: (error: Error) => void

    The error log is always guaranteed to be passed exactly a single error.

    info: (...args: ReadonlyArray<unknown>) => void

    The info log maybe receive any number of arguments of any type. Note that defaultServerLogger already contains logic to convert these into strings so you may want to utilize its behavior in your custom logging.