From e903edee0f71193e974a8397575d0dfbda2e606a Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Wed, 11 Sep 2024 18:42:17 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20FoxxMD/l?= =?UTF-8?q?ogging@e2b46bb0ad4f495175b5ded41567bf421ba4350b=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/factory.buildDestinationFile.html | 2 +- .../factory.buildDestinationJsonPrettyStream.html | 2 +- functions/factory.buildDestinationRollingFile.html | 2 +- functions/factory.buildDestinationStderr.html | 2 +- functions/factory.buildDestinationStdout.html | 2 +- functions/factory.buildDestinationStream.html | 2 +- functions/factory.buildLogger.html | 2 +- functions/factory.prettyOptsConsoleFactory.html | 2 +- functions/factory.prettyOptsFactory.html | 2 +- functions/factory.prettyOptsFileFactory.html | 2 +- functions/index.childLogger.html | 2 +- functions/index.isLogOptions.html | 2 +- functions/index.loggerApp.html | 2 +- functions/index.loggerAppRolling.html | 2 +- functions/index.parseLogOptions.html | 2 +- interfaces/index.FileLogOptions.html | 12 ++++++------ interfaces/index.LogOptions.html | 8 ++++---- interfaces/index.LoggerAppExtras.html | 12 ++++++------ interfaces/index.PrettyOptionsExtra.html | 6 +++--- .../index._internal_.FileLogOptionsStrong.html | 12 ++++++------ interfaces/index._internal_.FileLogPathOptions.html | 6 +++--- interfaces/index._internal_.FileOptions.html | 10 +++++----- interfaces/index._internal_.PinoRollOptions.html | 6 +++--- interfaces/index._internal_.RollOptions.html | 4 ++-- modules/factory.html | 2 +- modules/index.html | 2 +- types/factory.FileDestination.html | 2 +- types/factory.JsonPrettyDestination.html | 2 +- types/factory.StreamDestination.html | 2 +- types/factory._internal_.FileOptionsParsed.html | 2 +- types/factory._internal_.PinoLoggerOptions.html | 2 +- types/index.LogData.html | 2 +- types/index.LogDataPretty.html | 2 +- types/index.LogLevel.html | 2 +- types/index.LogLevelStreamEntry.html | 2 +- types/index.Logger.html | 2 +- types/index._internal_.FileLogOptionsParsed.html | 2 +- types/index._internal_.LogOptionsParsed.html | 2 +- variables/factory.PRETTY_COLORS.html | 2 +- variables/factory.PRETTY_COLORS_STR.html | 2 +- variables/factory.PRETTY_ISO8601.html | 2 +- variables/factory.PRETTY_OPTS_CONSOLE.html | 2 +- variables/factory.PRETTY_OPTS_FILE.html | 2 +- variables/index.LOG_LEVEL_NAMES.html | 2 +- variables/index.loggerDebug.html | 2 +- variables/index.loggerTest.html | 2 +- 46 files changed, 75 insertions(+), 75 deletions(-) diff --git a/functions/factory.buildDestinationFile.html b/functions/factory.buildDestinationFile.html index 2742976..25a439a 100644 --- a/functions/factory.buildDestinationFile.html +++ b/functions/factory.buildDestinationFile.html @@ -1,2 +1,2 @@ buildDestinationFile | @foxxmd/logging Docs

Creates a LogLevelStreamEntry stream that writes to a static file at or above the minimum level

-
+
diff --git a/functions/factory.buildDestinationJsonPrettyStream.html b/functions/factory.buildDestinationJsonPrettyStream.html index ead4797..8ca9f21 100644 --- a/functions/factory.buildDestinationJsonPrettyStream.html +++ b/functions/factory.buildDestinationJsonPrettyStream.html @@ -7,4 +7,4 @@
  • the destination stream passed MUST be set to objectMode: true
  • DestinationStream

    -
    +
    diff --git a/functions/factory.buildDestinationRollingFile.html b/functions/factory.buildDestinationRollingFile.html index b91642f..94cea7a 100644 --- a/functions/factory.buildDestinationRollingFile.html +++ b/functions/factory.buildDestinationRollingFile.html @@ -1,2 +1,2 @@ buildDestinationRollingFile | @foxxmd/logging Docs

    Function buildDestinationRollingFile

    Creates a LogLevelStreamEntry stream that writes to a rolling file at or above the minimum level

    -
    +
    diff --git a/functions/factory.buildDestinationStderr.html b/functions/factory.buildDestinationStderr.html index 2283672..a5e460e 100644 --- a/functions/factory.buildDestinationStderr.html +++ b/functions/factory.buildDestinationStderr.html @@ -3,4 +3,4 @@

    buildDestinationStream

    -
    +
    diff --git a/functions/factory.buildDestinationStdout.html b/functions/factory.buildDestinationStdout.html index 3bff276..6f39128 100644 --- a/functions/factory.buildDestinationStdout.html +++ b/functions/factory.buildDestinationStdout.html @@ -3,4 +3,4 @@

    buildDestinationStream

    -
    +
    diff --git a/functions/factory.buildDestinationStream.html b/functions/factory.buildDestinationStream.html index bb9d2d7..019a484 100644 --- a/functions/factory.buildDestinationStream.html +++ b/functions/factory.buildDestinationStream.html @@ -1,3 +1,3 @@ buildDestinationStream | @foxxmd/logging Docs

    Creates a LogLevelStreamEntry stream that writes to a NodeJs.WriteableStream or Sonic Boom DestinationStream at or above the minimum level

    DestinationStream

    -
    +
    diff --git a/functions/factory.buildLogger.html b/functions/factory.buildLogger.html index 007d90b..d63b94b 100644 --- a/functions/factory.buildLogger.html +++ b/functions/factory.buildLogger.html @@ -1,4 +1,4 @@ buildLogger | @foxxmd/logging Docs

    Builds a Logger object for use in your application

    defaultLevel must the minimum level ANY stream can log from IE it should be the lowest level any of your streams will possibly log. Recommended to always use debug.

    Logger

    -
    +
    diff --git a/functions/factory.prettyOptsConsoleFactory.html b/functions/factory.prettyOptsConsoleFactory.html index 4326d1b..54d87ee 100644 --- a/functions/factory.prettyOptsConsoleFactory.html +++ b/functions/factory.prettyOptsConsoleFactory.html @@ -2,4 +2,4 @@
    const prettyOptsConsoleFactory = (opts: PrettyOptionsExtra = {}): PrettyOptions => prettyOptsFactory({...opts, ...PRETTY_OPTS_CONSOLE_DEFAULTS})
     
    -
    +
    diff --git a/functions/factory.prettyOptsFactory.html b/functions/factory.prettyOptsFactory.html index 2048c26..e245709 100644 --- a/functions/factory.prettyOptsFactory.html +++ b/functions/factory.prettyOptsFactory.html @@ -1,2 +1,2 @@ prettyOptsFactory | @foxxmd/logging Docs

    Builds the opinionated @foxxmd/logging defaults for pino-pretty PrettyOptions and merges them with an optional user-provided PrettyOptions object

    -
    +
    diff --git a/functions/factory.prettyOptsFileFactory.html b/functions/factory.prettyOptsFileFactory.html index ee5795c..f722054 100644 --- a/functions/factory.prettyOptsFileFactory.html +++ b/functions/factory.prettyOptsFileFactory.html @@ -2,4 +2,4 @@
    const prettyOptsFileFactory = (opts: PrettyOptionsExtra = {}): PrettyOptions => prettyOptsFactory({...opts, ...PRETTY_OPTS_FILE_DEFAULTS})
     
    -
    +
    diff --git a/functions/index.childLogger.html b/functions/index.childLogger.html index 2868592..c0ea5fc 100644 --- a/functions/index.childLogger.html +++ b/functions/index.childLogger.html @@ -3,4 +3,4 @@
  • labelsVal: any = []

    (any | any[]) Labels to always apply to logs from this logger

  • context: object = {}

    object Additional properties to always apply to logs from this logger

  • options: {} = {}

    object

    -
  • Returns Logger

    +

    Returns Logger

    diff --git a/functions/index.isLogOptions.html b/functions/index.isLogOptions.html index 1cc24f7..b17e35d 100644 --- a/functions/index.isLogOptions.html +++ b/functions/index.isLogOptions.html @@ -1 +1 @@ -isLogOptions | @foxxmd/logging Docs
    +isLogOptions | @foxxmd/logging Docs
    diff --git a/functions/index.loggerApp.html b/functions/index.loggerApp.html index c57195b..234ebca 100644 --- a/functions/index.loggerApp.html +++ b/functions/index.loggerApp.html @@ -1,2 +1,2 @@ loggerApp | @foxxmd/logging Docs

    A Logger that logs to console and a static file

    -
    +
    diff --git a/functions/index.loggerAppRolling.html b/functions/index.loggerAppRolling.html index b5c3085..e466dcb 100644 --- a/functions/index.loggerAppRolling.html +++ b/functions/index.loggerAppRolling.html @@ -1,2 +1,2 @@ loggerAppRolling | @foxxmd/logging Docs

    A Logger that logs to console and a rolling file

    -
    +
    diff --git a/functions/index.parseLogOptions.html b/functions/index.parseLogOptions.html index 2dcd8f2..19c45b5 100644 --- a/functions/index.parseLogOptions.html +++ b/functions/index.parseLogOptions.html @@ -1,2 +1,2 @@ parseLogOptions | @foxxmd/logging Docs

    Takes an object and parses it into a fully-populated LogOptions object based on opinionated defaults

    -
    +
    diff --git a/interfaces/index.FileLogOptions.html b/interfaces/index.FileLogOptions.html index 4f19861..39f849e 100644 --- a/interfaces/index.FileLogOptions.html +++ b/interfaces/index.FileLogOptions.html @@ -2,7 +2,7 @@
    const fileLogger = loggerRollingApp({
    file: {
    level: 'warn', // file will log `warn` and higher
    path: '/my/cool/path/output.log', // output to log file at this path
    frequency: 'daily', // rotate hourly
    size: '20MB', // rotate if file size grows larger than 20MB
    timestamp: 'unix' // use unix epoch timestamp instead of iso8601 in rolling file
    }
    });
    -
    interface FileLogOptions {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
        timestamp?: "unix" | "iso" | "auto";
        path?: string | (() => string);
        level?:
            | false
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
    }

    Hierarchy (view full)

    Properties

    interface FileLogOptions {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
        timestamp?: "unix" | "iso" | "auto";
        path?: string | (() => string);
        level?:
            | false
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
    }

    Hierarchy (view full)

    Properties

    size? frequency? timestamp? path? @@ -13,13 +13,13 @@
    '10MB'
     
    -
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    +
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    Use daily or hourly to rotate file every day (or every hour). Existing file within the current day (or hour) will be re-used.

    Numerical values will be considered as a number of milliseconds. Using a numerical value will always create a new file upon startup.

    'daily'
     
    -
    timestamp?: "unix" | "iso" | "auto"

    For rolling log files

    +
    timestamp?: "unix" | "iso" | "auto"

    For rolling log files

    When

    • value passed to rolling destination is a string (path from LogOptions is a string) and
    • @@ -39,7 +39,7 @@
    'auto'
     
    -
    path?: string | (() => string)

    The path and filename to use for log files.

    +
    path?: string | (() => string)

    The path and filename to use for log files.

    If using rolling files the filename will be appended with .N (a number) BEFORE the extension based on rolling status.

    May also be specified using env LOG_PATH or a function that returns a string.

    If path is relative the absolute path will be derived from logBaseDir (in LoggerAppExtras) which defaults to CWD

    @@ -47,5 +47,5 @@

    LoggerAppExtras

    -
    level?:
        | false
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"

    Specify the minimum log level to output to rotating files. If false no log files will be created.

    -
    +
    level?:
        | false
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"

    Specify the minimum log level to output to rotating files. If false no log files will be created.

    +
    diff --git a/interfaces/index.LogOptions.html b/interfaces/index.LogOptions.html index 4a4739e..af1c9df 100644 --- a/interfaces/index.LogOptions.html +++ b/interfaces/index.LogOptions.html @@ -2,7 +2,7 @@
    const infoLogger = loggerApp({
    level: 'info' // console and file will log any levels `info` and above
    });

    const logger = loggerApp({
    console: 'debug', // console will log `debug` and higher
    file: 'warn' // file will log `warn` and higher
    });

    const fileLogger = loggerRollingApp({
    console: 'debug', // console will log `debug` and higher
    file: {
    level: 'warn', // file will log `warn` and higher
    path: '/my/cool/path/output.log', // optionally, output to log file at this path
    frequency: 'hourly', // optionally, rotate hourly
    }
    });
    -
    interface LogOptions {
        level?:
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
        file?:
            | false
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug"
            | FileLogOptions;
        console?:
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
    }

    Properties

    interface LogOptions {
        level?:
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
        file?:
            | false
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug"
            | FileLogOptions;
        console?:
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
    }

    Properties

    Properties

    level?:
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"

    Specify the minimum log level for all log outputs without their own level specified.

    @@ -10,6 +10,6 @@
    'info'
     
    -
    file?:
        | false
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"
        | FileLogOptions

    Specify the minimum log level to output to rotating files or file output options. If false no log files will be created.

    -
    console?:
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"

    Specify the minimum log level streamed to the console (or docker container)

    -
    +
    file?:
        | false
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"
        | FileLogOptions

    Specify the minimum log level to output to rotating files or file output options. If false no log files will be created.

    +
    console?:
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"

    Specify the minimum log level streamed to the console (or docker container)

    +
    diff --git a/interfaces/index.LoggerAppExtras.html b/interfaces/index.LoggerAppExtras.html index 0c1d089..be4b209 100644 --- a/interfaces/index.LoggerAppExtras.html +++ b/interfaces/index.LoggerAppExtras.html @@ -1,5 +1,5 @@ LoggerAppExtras | @foxxmd/logging Docs

    Additional settings and Pino Transports to apply to the returned Logger.

    -
    interface LoggerAppExtras {
        logBaseDir?: string;
        logDefaultPath?: string;
        pretty?: PrettyOptionsExtra;
        destinations?: LogLevelStreamEntry[];
        pino?: PinoLoggerOptions;
    }

    Hierarchy (view full)

    Properties

    interface LoggerAppExtras {
        logBaseDir?: string;
        logDefaultPath?: string;
        pretty?: PrettyOptionsExtra;
        destinations?: LogLevelStreamEntry[];
        pino?: PinoLoggerOptions;
    }

    Hierarchy (view full)

    Properties

    logBaseDir? logDefaultPath? pretty? destinations? @@ -9,13 +9,13 @@
    'CWD'
     
    -
    logDefaultPath?: string

    The default path to use when parsing file logging options.

    +
    logDefaultPath?: string

    The default path to use when parsing file logging options.

    If this path is relative it is joined with logBaseDir

    FileOptions

    './logs/app.log'
     
    -

    Additional pino-pretty options that are applied to the built-in console/log streams

    -
    destinations?: LogLevelStreamEntry[]

    Additional logging destinations to use alongside the built-in console/log stream. These can be any created by buildDestination* functions or other Pino Transports

    -

    Additional Pino Log options that are passed to pino() on logger creation

    -
    +

    Additional pino-pretty options that are applied to the built-in console/log streams

    +
    destinations?: LogLevelStreamEntry[]

    Additional logging destinations to use alongside the built-in console/log stream. These can be any created by buildDestination* functions or other Pino Transports

    +

    Additional Pino Log options that are passed to pino() on logger creation

    +
    diff --git a/interfaces/index.PrettyOptionsExtra.html b/interfaces/index.PrettyOptionsExtra.html index 86b5707..abe1de3 100644 --- a/interfaces/index.PrettyOptionsExtra.html +++ b/interfaces/index.PrettyOptionsExtra.html @@ -1,5 +1,5 @@ PrettyOptionsExtra | @foxxmd/logging Docs

    pino-pretty options and additional options specific to how @foxxmd/logging uses pino-pretty

    -
    interface PrettyOptionsExtra {
        hideObject?: boolean;
        translateTime?: string | boolean;
        levelFirst?: boolean;
        levelKey?: string;
        levelLabel?: string;
        messageKey?: string;
        singleLine?: boolean;
        timestampKey?: string;
        minimumLevel?: Level;
        messageFormat?: string | false | MessageFormatFunc;
        colorize?: boolean;
        colorizeObjects?: boolean;
        crlf?: boolean;
        errorLikeObjectKeys?: string[];
        errorProps?: string;
        ignore?: string;
        include?: string;
        sync?: boolean;
        destination?:
            | string
            | number
            | DestinationStream
            | WritableStream;
        append?: boolean;
        mkdir?: boolean;
        customPrettifiers?: Record<string, Prettifier<object>> & {
            level?: Prettifier<LevelPrettifierExtras>;
        };
        customColors?: string | object;
        useOnlyCustomProps?: boolean;
        redactCwd?: boolean;
        padLevels?: boolean;
    }

    Hierarchy (view full)

    Properties

    interface PrettyOptionsExtra {
        hideObject?: boolean;
        translateTime?: string | boolean;
        levelFirst?: boolean;
        levelKey?: string;
        levelLabel?: string;
        messageKey?: string;
        singleLine?: boolean;
        timestampKey?: string;
        minimumLevel?: Level;
        messageFormat?: string | false | MessageFormatFunc;
        colorize?: boolean;
        colorizeObjects?: boolean;
        crlf?: boolean;
        errorLikeObjectKeys?: string[];
        errorProps?: string;
        ignore?: string;
        include?: string;
        sync?: boolean;
        destination?:
            | string
            | number
            | DestinationStream
            | WritableStream;
        append?: boolean;
        mkdir?: boolean;
        customPrettifiers?: Record<string, Prettifier<object>> & {
            level?: Prettifier<LevelPrettifierExtras>;
        };
        customColors?: string | object;
        useOnlyCustomProps?: boolean;
        redactCwd?: boolean;
        padLevels?: boolean;
    }

    Hierarchy (view full)

    Properties

    hideObject? translateTime? levelFirst? levelKey? @@ -150,8 +150,8 @@ Also supports 'default' as level_name for fallback color.

    true
     
    -
    padLevels?: boolean

    Pads levels in log string so all are the same length

    +
    padLevels?: boolean

    Pads levels in log string so all are the same length

    true
     
    -
    +
    diff --git a/interfaces/index._internal_.FileLogOptionsStrong.html b/interfaces/index._internal_.FileLogOptionsStrong.html index 5ae77f5..1b10f99 100644 --- a/interfaces/index._internal_.FileLogOptionsStrong.html +++ b/interfaces/index._internal_.FileLogOptionsStrong.html @@ -2,7 +2,7 @@
    const fileLogger = loggerRollingApp({
    file: {
    level: 'warn', // file will log `warn` and higher
    path: '/my/cool/path/output.log', // output to log file at this path
    frequency: 'daily', // rotate hourly
    size: '20MB', // rotate if file size grows larger than 20MB
    timestamp: 'unix' // use unix epoch timestamp instead of iso8601 in rolling file
    }
    });
    -
    interface FileLogOptionsStrong {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
        timestamp?: "unix" | "iso" | "auto";
        level:
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
        path: string | (() => string);
    }

    Hierarchy (view full)

    Properties

    interface FileLogOptionsStrong {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
        timestamp?: "unix" | "iso" | "auto";
        level:
            | "silent"
            | "fatal"
            | "error"
            | "warn"
            | "info"
            | "log"
            | "verbose"
            | "debug";
        path: string | (() => string);
    }

    Hierarchy (view full)

    Properties

    size? frequency? timestamp? level @@ -13,13 +13,13 @@
    '10MB'
     
    -
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    +
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    Use daily or hourly to rotate file every day (or every hour). Existing file within the current day (or hour) will be re-used.

    Numerical values will be considered as a number of milliseconds. Using a numerical value will always create a new file upon startup.

    'daily'
     
    -
    timestamp?: "unix" | "iso" | "auto"

    For rolling log files

    +
    timestamp?: "unix" | "iso" | "auto"

    For rolling log files

    When

    • value passed to rolling destination is a string (path from LogOptions is a string) and
    • @@ -39,8 +39,8 @@
    'auto'
     
    -
    level:
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"

    Specify the minimum log level to output to rotating files. If false no log files will be created.

    -
    path: string | (() => string)

    The path and filename to use for log files.

    +
    level:
        | "silent"
        | "fatal"
        | "error"
        | "warn"
        | "info"
        | "log"
        | "verbose"
        | "debug"

    Specify the minimum log level to output to rotating files. If false no log files will be created.

    +
    path: string | (() => string)

    The path and filename to use for log files.

    If using rolling files the filename will be appended with .N (a number) BEFORE the extension based on rolling status.

    May also be specified using env LOG_PATH or a function that returns a string.

    If path is relative the absolute path will be derived from logBaseDir (in LoggerAppExtras) which defaults to CWD

    @@ -48,4 +48,4 @@

    LoggerAppExtras

    -
    +
    diff --git a/interfaces/index._internal_.FileLogPathOptions.html b/interfaces/index._internal_.FileLogPathOptions.html index eed723b..20e3c9e 100644 --- a/interfaces/index._internal_.FileLogPathOptions.html +++ b/interfaces/index._internal_.FileLogPathOptions.html @@ -1,14 +1,14 @@ -FileLogPathOptions | @foxxmd/logging Docs
    interface FileLogPathOptions {
        logBaseDir?: string;
        logDefaultPath?: string;
    }

    Hierarchy (view full)

    Properties

    logBaseDir? +FileLogPathOptions | @foxxmd/logging Docs
    interface FileLogPathOptions {
        logBaseDir?: string;
        logDefaultPath?: string;
    }

    Hierarchy (view full)

    Properties

    logBaseDir?: string

    The base path to use when parsing file logging options.

    FileOptions

    'CWD'
     
    -
    logDefaultPath?: string

    The default path to use when parsing file logging options.

    +
    logDefaultPath?: string

    The default path to use when parsing file logging options.

    If this path is relative it is joined with logBaseDir

    FileOptions

    './logs/app.log'
     
    -
    +
    diff --git a/interfaces/index._internal_.FileOptions.html b/interfaces/index._internal_.FileOptions.html index 232b439..cdcc69d 100644 --- a/interfaces/index._internal_.FileOptions.html +++ b/interfaces/index._internal_.FileOptions.html @@ -2,7 +2,7 @@
    const fileLogger = loggerRollingApp({
    file: {
    level: 'warn', // file will log `warn` and higher
    path: '/my/cool/path/output.log', // output to log file at this path
    frequency: 'daily', // rotate hourly
    size: '20MB', // rotate if file size grows larger than 20MB
    timestamp: 'unix' // use unix epoch timestamp instead of iso8601 in rolling file
    }
    });
    -
    interface FileOptions {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
        timestamp?: "unix" | "iso" | "auto";
        path?: string | (() => string);
    }

    Hierarchy (view full)

    Properties

    interface FileOptions {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
        timestamp?: "unix" | "iso" | "auto";
        path?: string | (() => string);
    }

    Hierarchy (view full)

    Properties

    size? frequency? timestamp? path? @@ -12,13 +12,13 @@
    '10MB'
     
    -
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    +
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    Use daily or hourly to rotate file every day (or every hour). Existing file within the current day (or hour) will be re-used.

    Numerical values will be considered as a number of milliseconds. Using a numerical value will always create a new file upon startup.

    'daily'
     
    -
    timestamp?: "unix" | "iso" | "auto"

    For rolling log files

    +
    timestamp?: "unix" | "iso" | "auto"

    For rolling log files

    When

    • value passed to rolling destination is a string (path from LogOptions is a string) and
    • @@ -38,7 +38,7 @@
    'auto'
     
    -
    path?: string | (() => string)

    The path and filename to use for log files.

    +
    path?: string | (() => string)

    The path and filename to use for log files.

    If using rolling files the filename will be appended with .N (a number) BEFORE the extension based on rolling status.

    May also be specified using env LOG_PATH or a function that returns a string.

    If path is relative the absolute path will be derived from logBaseDir (in LoggerAppExtras) which defaults to CWD

    @@ -46,4 +46,4 @@

    LoggerAppExtras

    -
    +
    diff --git a/interfaces/index._internal_.PinoRollOptions.html b/interfaces/index._internal_.PinoRollOptions.html index 81f043f..4dc7ef1 100644 --- a/interfaces/index._internal_.PinoRollOptions.html +++ b/interfaces/index._internal_.PinoRollOptions.html @@ -1,4 +1,4 @@ -PinoRollOptions | @foxxmd/logging Docs
    interface PinoRollOptions {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
    }

    Hierarchy (view full)

    Properties

    size? +PinoRollOptions | @foxxmd/logging Docs
    interface PinoRollOptions {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
    }

    Hierarchy (view full)

    Properties

    Properties

    size?: string | number

    The maximum size of a given rolling log file.

    Can be combined with frequency. Use k, m and g to express values in KB, MB or GB.

    @@ -6,10 +6,10 @@
    '10MB'
     
    -
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    +
    frequency?: number | "daily" | "hourly"

    The amount of time a given rolling log file is used. Can be combined with size.

    Use daily or hourly to rotate file every day (or every hour). Existing file within the current day (or hour) will be re-used.

    Numerical values will be considered as a number of milliseconds. Using a numerical value will always create a new file upon startup.

    'daily'
     
    -
    +
    diff --git a/interfaces/index._internal_.RollOptions.html b/interfaces/index._internal_.RollOptions.html index 0117038..13b2066 100644 --- a/interfaces/index._internal_.RollOptions.html +++ b/interfaces/index._internal_.RollOptions.html @@ -1,4 +1,4 @@ -RollOptions | @foxxmd/logging Docs
    interface RollOptions {
        timestamp?: "unix" | "iso" | "auto";
    }

    Hierarchy (view full)

    Properties

    timestamp? +RollOptions | @foxxmd/logging Docs
    interface RollOptions {
        timestamp?: "unix" | "iso" | "auto";
    }

    Hierarchy (view full)

    Properties

    Properties

    timestamp?: "unix" | "iso" | "auto"

    For rolling log files

    When

      @@ -19,4 +19,4 @@
    'auto'
     
    -
    +
    diff --git a/modules/factory.html b/modules/factory.html index c7b1eaf..90138e1 100644 --- a/modules/factory.html +++ b/modules/factory.html @@ -1,4 +1,4 @@ -factory | @foxxmd/logging Docs

    Index

    Modules

    <internal> +factory | @foxxmd/logging Docs

    Index

    Modules

    Type Aliases

    FileDestination StreamDestination JsonPrettyDestination diff --git a/modules/index.html b/modules/index.html index 496169f..624d516 100644 --- a/modules/index.html +++ b/modules/index.html @@ -1,4 +1,4 @@ -index | @foxxmd/logging Docs

    Index

    Modules

    <internal> +index | @foxxmd/logging Docs

    Index

    Modules

    Interfaces

    LogOptions FileLogOptions LoggerAppExtras diff --git a/types/factory.FileDestination.html b/types/factory.FileDestination.html index 7aa068e..89c7d37 100644 --- a/types/factory.FileDestination.html +++ b/types/factory.FileDestination.html @@ -1 +1 @@ -FileDestination | @foxxmd/logging Docs
    FileDestination: Omit<PrettyOptionsExtra, "destination" | "sync"> & FileOptionsParsed
    +FileDestination | @foxxmd/logging Docs
    FileDestination: Omit<PrettyOptionsExtra, "destination" | "sync"> & FileOptionsParsed
    diff --git a/types/factory.JsonPrettyDestination.html b/types/factory.JsonPrettyDestination.html index 48de9d8..557bbf6 100644 --- a/types/factory.JsonPrettyDestination.html +++ b/types/factory.JsonPrettyDestination.html @@ -1,2 +1,2 @@ JsonPrettyDestination | @foxxmd/logging Docs

    Type Alias JsonPrettyDestination

    JsonPrettyDestination: StreamDestination & {
        object?: boolean;
    }

    Type declaration

    • Optionalobject?: boolean

      Specify if the stream should output log as object or stringified JSON

      -
    +
    diff --git a/types/factory.StreamDestination.html b/types/factory.StreamDestination.html index 76e54d4..e54f1da 100644 --- a/types/factory.StreamDestination.html +++ b/types/factory.StreamDestination.html @@ -1 +1 @@ -StreamDestination | @foxxmd/logging Docs
    StreamDestination: Omit<PrettyOptionsExtra, "destination"> & {
        destination: number | DestinationStream | WritableStream;
    }
    +StreamDestination | @foxxmd/logging Docs
    StreamDestination: Omit<PrettyOptionsExtra, "destination"> & {
        destination: number | DestinationStream | WritableStream;
    }
    diff --git a/types/factory._internal_.FileOptionsParsed.html b/types/factory._internal_.FileOptionsParsed.html index 81f33ca..2e9881a 100644 --- a/types/factory._internal_.FileOptionsParsed.html +++ b/types/factory._internal_.FileOptionsParsed.html @@ -1 +1 @@ -FileOptionsParsed | @foxxmd/logging Docs
    FileOptionsParsed: MarkRequired<FileOptions, "path">
    +FileOptionsParsed | @foxxmd/logging Docs
    FileOptionsParsed: MarkRequired<FileOptions, "path">
    diff --git a/types/factory._internal_.PinoLoggerOptions.html b/types/factory._internal_.PinoLoggerOptions.html index 1517d0a..cb66d0a 100644 --- a/types/factory._internal_.PinoLoggerOptions.html +++ b/types/factory._internal_.PinoLoggerOptions.html @@ -1,2 +1,2 @@ PinoLoggerOptions | @foxxmd/logging Docs
    PinoLoggerOptions: Omit<LoggerOptions,
        | "level"
        | "mixin"
        | "mixinMergeStrategy"
        | "customLevels"
        | "useOnlyCustomLevels"
        | "transport">

    Additional Pino Log options that are passed to pino() on logger creation

    -
    +
    diff --git a/types/index.LogData.html b/types/index.LogData.html index 1785f85..775fdf0 100644 --- a/types/index.LogData.html +++ b/types/index.LogData.html @@ -1,2 +1,2 @@ LogData | @foxxmd/logging Docs
    LogData: Record<string, any> & {
        level: number;
        time: number;
        pid: number;
        hostname: string;
        labels: any[];
        msg: string | Error;
    }

    The structure of a Log object when returned by a stream data event

    -
    +
    diff --git a/types/index.LogDataPretty.html b/types/index.LogDataPretty.html index 0c278ae..3a36b65 100644 --- a/types/index.LogDataPretty.html +++ b/types/index.LogDataPretty.html @@ -1 +1 @@ -LogDataPretty | @foxxmd/logging Docs
    LogDataPretty: LogData & {
        line: string;
    }
    +LogDataPretty | @foxxmd/logging Docs
    LogDataPretty: LogData & {
        line: string;
    }
    diff --git a/types/index.LogLevel.html b/types/index.LogLevel.html index 5ae1f70..4a4c9ad 100644 --- a/types/index.LogLevel.html +++ b/types/index.LogLevel.html @@ -11,4 +11,4 @@
  • silent (will never output anything)
  • When used in LogOptions specifies the minimum level the output should log at.

    -
    +
    diff --git a/types/index.LogLevelStreamEntry.html b/types/index.LogLevelStreamEntry.html index 169fcc5..59d9357 100644 --- a/types/index.LogLevelStreamEntry.html +++ b/types/index.LogLevelStreamEntry.html @@ -1,3 +1,3 @@ LogLevelStreamEntry | @foxxmd/logging Docs

    Type Alias LogLevelStreamEntry

    LogLevelStreamEntry: StreamEntry<LogLevel>

    An object with a write function that can be used by pino as a Transport

    All buildDestination* functions return this type as well as any Pino Transport

    -
    +
    diff --git a/types/index.Logger.html b/types/index.Logger.html index 0c55ee7..0086de6 100644 --- a/types/index.Logger.html +++ b/types/index.Logger.html @@ -1 +1 @@ -Logger | @foxxmd/logging Docs
    Logger: Logger<LogLevel> & {
        labels: any[];
        addLabel: ((value: any) => void);
    }
    +Logger | @foxxmd/logging Docs
    Logger: Logger<LogLevel> & {
        labels: any[];
        addLabel: ((value: any) => void);
    }
    diff --git a/types/index._internal_.FileLogOptionsParsed.html b/types/index._internal_.FileLogOptionsParsed.html index 137da55..3e69ef7 100644 --- a/types/index._internal_.FileLogOptionsParsed.html +++ b/types/index._internal_.FileLogOptionsParsed.html @@ -1 +1 @@ -FileLogOptionsParsed | @foxxmd/logging Docs
    FileLogOptionsParsed: Omit<FileLogOptions, "file"> & {
        level: false;
    } | FileLogOptionsStrong
    +FileLogOptionsParsed | @foxxmd/logging Docs
    FileLogOptionsParsed: Omit<FileLogOptions, "file"> & {
        level: false;
    } | FileLogOptionsStrong
    diff --git a/types/index._internal_.LogOptionsParsed.html b/types/index._internal_.LogOptionsParsed.html index 5c2f026..79a20f3 100644 --- a/types/index._internal_.LogOptionsParsed.html +++ b/types/index._internal_.LogOptionsParsed.html @@ -1 +1 @@ -LogOptionsParsed | @foxxmd/logging Docs
    LogOptionsParsed: Omit<Required<LogOptions>, "file"> & {
        file: FileLogOptionsParsed;
    }
    +LogOptionsParsed | @foxxmd/logging Docs
    LogOptionsParsed: Omit<Required<LogOptions>, "file"> & {
        file: FileLogOptionsParsed;
    }
    diff --git a/variables/factory.PRETTY_COLORS.html b/variables/factory.PRETTY_COLORS.html index 68c4d65..ecb7cfd 100644 --- a/variables/factory.PRETTY_COLORS.html +++ b/variables/factory.PRETTY_COLORS.html @@ -1,3 +1,3 @@ PRETTY_COLORS | @foxxmd/logging Docs

    Variable PRETTY_COLORSConst

    PRETTY_COLORS: Extract<PrettyOptions["customColors"], object> = ...

    Additional level colors included in @foxxmd/logging as a string

    These are always applied when using prettyOptsFactory but can be overridden

    -
    +
    diff --git a/variables/factory.PRETTY_COLORS_STR.html b/variables/factory.PRETTY_COLORS_STR.html index 242034b..83c632d 100644 --- a/variables/factory.PRETTY_COLORS_STR.html +++ b/variables/factory.PRETTY_COLORS_STR.html @@ -1,3 +1,3 @@ PRETTY_COLORS_STR | @foxxmd/logging Docs

    Variable PRETTY_COLORS_STRConst

    PRETTY_COLORS_STR: Extract<PrettyOptions["customColors"], string> = 'verbose:magenta,log:greenBright'

    Additional level colors included in @foxxmd/logging as an object

    These are always applied when using prettyOptsFactory but can be overridden

    -
    +
    diff --git a/variables/factory.PRETTY_ISO8601.html b/variables/factory.PRETTY_ISO8601.html index 3b6d9af..d6918f3 100644 --- a/variables/factory.PRETTY_ISO8601.html +++ b/variables/factory.PRETTY_ISO8601.html @@ -1,2 +1,2 @@ PRETTY_ISO8601 | @foxxmd/logging Docs

    Variable PRETTY_ISO8601Const

    PRETTY_ISO8601: "SYS:yyyy-mm-dd\"T\"HH:MM:ssp" = 'SYS:yyyy-mm-dd"T"HH:MM:ssp'

    Use on translateTime pino-pretty option to print timestamps in ISO8601 format

    -
    +
    diff --git a/variables/factory.PRETTY_OPTS_CONSOLE.html b/variables/factory.PRETTY_OPTS_CONSOLE.html index ebb81d5..b68df4a 100644 --- a/variables/factory.PRETTY_OPTS_CONSOLE.html +++ b/variables/factory.PRETTY_OPTS_CONSOLE.html @@ -2,4 +2,4 @@
    const PRETTY_OPTS_CONSOLE: PrettyOptions = prettyOptsConsoleFactory()
     
    -
    +
    diff --git a/variables/factory.PRETTY_OPTS_FILE.html b/variables/factory.PRETTY_OPTS_FILE.html index 362f54f..011e173 100644 --- a/variables/factory.PRETTY_OPTS_FILE.html +++ b/variables/factory.PRETTY_OPTS_FILE.html @@ -2,4 +2,4 @@
    const PRETTY_OPTS_FILE: PrettyOptions = prettyOptsFileFactory()
     
    -
    +
    diff --git a/variables/index.LOG_LEVEL_NAMES.html b/variables/index.LOG_LEVEL_NAMES.html index ff134c3..45953ef 100644 --- a/variables/index.LOG_LEVEL_NAMES.html +++ b/variables/index.LOG_LEVEL_NAMES.html @@ -1 +1 @@ -LOG_LEVEL_NAMES | @foxxmd/logging Docs

    Variable LOG_LEVEL_NAMESConst

    LOG_LEVEL_NAMES: readonly ["silent", "fatal", "error", "warn", "info", "log", "verbose", "debug"] = ...
    +LOG_LEVEL_NAMES | @foxxmd/logging Docs

    Variable LOG_LEVEL_NAMESConst

    LOG_LEVEL_NAMES: readonly ["silent", "fatal", "error", "warn", "info", "log", "verbose", "debug"] = ...
    diff --git a/variables/index.loggerDebug.html b/variables/index.loggerDebug.html index 88c69b3..0b955bc 100644 --- a/variables/index.loggerDebug.html +++ b/variables/index.loggerDebug.html @@ -2,4 +2,4 @@
    const loggerDebug = buildLogger('debug', [buildDestinationStdout('debug')])
     
    -
    +
    diff --git a/variables/index.loggerTest.html b/variables/index.loggerTest.html index 2783608..23ac330 100644 --- a/variables/index.loggerTest.html +++ b/variables/index.loggerTest.html @@ -2,4 +2,4 @@
    const loggerTest = buildLogger('silent', [buildDestinationStdout('debug')])
     
    -
    +
    -- 2.51.2