rest-vir - v1.0.0
    Preparing search index...

    Type Alias ServiceLogger

    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 ServiceLogger = {
        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 defaultServiceLogger already contains logic to convert these into strings so you may want to utilize its behavior in your custom logging.