From df6e75a32e5bcbe64ada2ce113c1fc404e274a23 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Wed, 3 Sep 2025 17:06:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20FoxxMD/l?= =?UTF-8?q?ogging@5fde5b7fae1e700349b37bc0460a0edc415ab96c=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 e3cf16d..9e9e7d7 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 5c54fba..55263da 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 de8abe4..3441a4a 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 548748b..4d6c2cd 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 be453d7..7728872 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 e364921..225f707 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 6ea69fa..338e396 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 d452c38..715b6ac 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 fee392c..a936f97 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 a65e48b..8939159 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 054f0d2..4cf2f28 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 f7f904d..e1fff6c 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 908ca4c..011d590 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 3352961..6220605 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 3099c94..66c2919 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 339c47e..6578a4e 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 49c04bc..1841d91 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 3b9b9e1..da18845 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 8467c66..1b82614 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 60cdf9f..7e72eaa 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 8b2f9dc..2bb6ac3 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 2f2d5ff..fc1ce20 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 1d96a78..de66996 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 a6256cc..252b125 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 b44e1d1..6476600 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 6522600..05426f4 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 0719ebb..c618b0c 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 e76fdff..3efe9f8 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 3a4a367..680c526 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 a2134bf..5a26b6b 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 5b3b894..5826d2b 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 463a209..e9064a3 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 6e1f612..dbb8fbd 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 3e54897..3263c2e 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 ae88983..99da710 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 d33f45f..46799e8 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 33f3638..fb4893b 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 7f71fcf..d9c115f 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 706318b..1b6017a 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 6d4591c..bf40be8 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 5051012..b6e0385 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 fc97316..ac94e83 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 9099568..27d6ac3 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 80b5807..f0c92ad 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 0ed952d..1212c34 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 8380510..35d4259 100644 --- a/variables/index.loggerTest.html +++ b/variables/index.loggerTest.html @@ -2,4 +2,4 @@
    const loggerTest = buildLogger('silent', [buildDestinationStdout('debug')])
     
    -
    +
    -- knotmirror 0.0.1