diff --git a/functions/factory.buildDestinationFile.html b/functions/factory.buildDestinationFile.html index 2b3620a..44bb289 100644 --- a/functions/factory.buildDestinationFile.html +++ b/functions/factory.buildDestinationFile.html @@ -1,2 +1,2 @@ buildDestinationFile | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns LogLevelStreamEntry

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationRollingFile.html b/functions/factory.buildDestinationRollingFile.html index bf08774..c6d161c 100644 --- a/functions/factory.buildDestinationRollingFile.html +++ b/functions/factory.buildDestinationRollingFile.html @@ -1,2 +1,2 @@ buildDestinationRollingFile | @foxxmd/logging Docs

Function buildDestinationRollingFile

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns Promise<LogLevelStreamEntry>

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStderr.html b/functions/factory.buildDestinationStderr.html index 2a54dc1..da95482 100644 --- a/functions/factory.buildDestinationStderr.html +++ b/functions/factory.buildDestinationStderr.html @@ -2,4 +2,4 @@

Parameters

Returns LogLevelStreamEntry

Source

const buildDestinationStderr = (level: LogLevel, options: Omit<StreamDestination, 'destination'> = {}): LogLevelStreamEntry => {
const opts = {...options, destination: destination({dest: 2, sync: true})};
return buildDestinationStream(level, opts);
}

See

buildDestinationStream

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStdout.html b/functions/factory.buildDestinationStdout.html index c077665..6459147 100644 --- a/functions/factory.buildDestinationStdout.html +++ b/functions/factory.buildDestinationStdout.html @@ -2,4 +2,4 @@

Parameters

Returns LogLevelStreamEntry

Source

const buildDestinationStdout = (level: LogLevel, options: Omit<StreamDestination, 'destination'> = {}): LogLevelStreamEntry => {
const opts = {...options, destination: destination({dest: 1, sync: true})}
return buildDestinationStream(level, opts);
}

See

buildDestinationStream

-

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStream.html b/functions/factory.buildDestinationStream.html index 9fdfd30..43a43d9 100644 --- a/functions/factory.buildDestinationStream.html +++ b/functions/factory.buildDestinationStream.html @@ -1,3 +1,3 @@ buildDestinationStream | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildLogger.html b/functions/factory.buildLogger.html index daa0c47..759ffd8 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.

    Parameters

    Returns Logger

    See

    Logger

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.prettyOptsConsoleFactory.html b/functions/factory.prettyOptsConsoleFactory.html index f179f9a..58ef0e0 100644 --- a/functions/factory.prettyOptsConsoleFactory.html +++ b/functions/factory.prettyOptsConsoleFactory.html @@ -1,4 +1,4 @@ prettyOptsConsoleFactory | @foxxmd/logging Docs
  • Generate pino-pretty PrettyOptions for use with console/stream output

    Parameters

    Returns PrettyOptions_

    Source

    const prettyOptsConsoleFactory = (opts: PrettyOptionsExtra = {}): PrettyOptions => prettyOptsFactory({...opts, ...PRETTY_OPTS_CONSOLE_DEFAULTS})
     
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.prettyOptsFactory.html b/functions/factory.prettyOptsFactory.html index db8a3d0..4a6673c 100644 --- a/functions/factory.prettyOptsFactory.html +++ b/functions/factory.prettyOptsFactory.html @@ -1,2 +1,2 @@ prettyOptsFactory | @foxxmd/logging Docs

Generated using TypeDoc

\ No newline at end of file +

Parameters

Returns PrettyOptions_

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.prettyOptsFileFactory.html b/functions/factory.prettyOptsFileFactory.html index d73cfc5..c8df225 100644 --- a/functions/factory.prettyOptsFileFactory.html +++ b/functions/factory.prettyOptsFileFactory.html @@ -1,4 +1,4 @@ prettyOptsFileFactory | @foxxmd/logging Docs
  • Generate pino-pretty PrettyOptions for use with file output

    Parameters

    Returns PrettyOptions_

    Source

    const prettyOptsFileFactory = (opts: PrettyOptionsExtra = {}): PrettyOptions => prettyOptsFactory({...opts, ...PRETTY_OPTS_FILE_DEFAULTS})
     
    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/index.childLogger.html b/functions/index.childLogger.html index 9f2ac94..f67de4e 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

    Generated using TypeDoc

    \ No newline at end of file +

    Returns Logger

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/index.isLogOptions.html b/functions/index.isLogOptions.html index 734774b..b4f5ee0 100644 --- a/functions/index.isLogOptions.html +++ b/functions/index.isLogOptions.html @@ -1 +1 @@ -isLogOptions | @foxxmd/logging Docs

    Generated using TypeDoc

    \ No newline at end of file +isLogOptions | @foxxmd/logging Docs

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/index.loggerApp.html b/functions/index.loggerApp.html index 40aebdb..6fe5c20 100644 --- a/functions/index.loggerApp.html +++ b/functions/index.loggerApp.html @@ -1,2 +1,2 @@ loggerApp | @foxxmd/logging Docs

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns Logger

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/index.loggerAppRolling.html b/functions/index.loggerAppRolling.html index 2b9e576..f354ecd 100644 --- a/functions/index.loggerAppRolling.html +++ b/functions/index.loggerAppRolling.html @@ -1,2 +1,2 @@ loggerAppRolling | @foxxmd/logging Docs

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns Promise<Logger>

    Generated using TypeDoc

    \ No newline at end of file diff --git a/functions/index.parseLogOptions.html b/functions/index.parseLogOptions.html index 72cefb8..9da0f9e 100644 --- a/functions/index.parseLogOptions.html +++ b/functions/index.parseLogOptions.html @@ -1,2 +1,2 @@ parseLogOptions | @foxxmd/logging Docs

    Generated using TypeDoc

    \ No newline at end of file +

    Parameters

    Returns LogOptionsParsed

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index.FileLogOptions.html b/interfaces/index.FileLogOptions.html index ce3b62a..73294b2 100644 --- a/interfaces/index.FileLogOptions.html +++ b/interfaces/index.FileLogOptions.html @@ -1,4 +1,4 @@ -FileLogOptions | @foxxmd/logging Docs
    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? +FileLogOptions | @foxxmd/logging Docs
    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? @@ -8,12 +8,12 @@

    Numerical values will be considered as MB.

    Default

    '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.

    Default

    '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
    • @@ -31,11 +31,11 @@

    Default

    '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 the current working directory.

    Type declaration

      • (): string
      • Returns string

    Default

    'CWD/logs/app.log'
     
    -
    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.

    -

    Generated using TypeDoc

    \ No newline at end of file +
    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.

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index.LogOptions.html b/interfaces/index.LogOptions.html index 6213e79..ffba57a 100644 --- a/interfaces/index.LogOptions.html +++ b/interfaces/index.LogOptions.html @@ -1,10 +1,10 @@ -LogOptions | @foxxmd/logging Docs
    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

    level? +LogOptions | @foxxmd/logging Docs
    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.

    Defaults to env LOG_LEVEL or info if not specified.

    Default

    '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)

    -

    Generated using TypeDoc

    \ No newline at end of file +
    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)

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index.LoggerAppExtras.html b/interfaces/index.LoggerAppExtras.html index 7fc95a0..d111e37 100644 --- a/interfaces/index.LoggerAppExtras.html +++ b/interfaces/index.LoggerAppExtras.html @@ -1,7 +1,7 @@ -LoggerAppExtras | @foxxmd/logging Docs
    interface LoggerAppExtras {
        pretty?: PrettyOptionsExtra;
        destinations?: LogLevelStreamEntry[];
        pino?: PinoLoggerOptions;
    }

    Properties

    pretty? +LoggerAppExtras | @foxxmd/logging Docs
    interface LoggerAppExtras {
        pretty?: PrettyOptionsExtra;
        destinations?: LogLevelStreamEntry[];
        pino?: PinoLoggerOptions;
    }

    Properties

    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

    -

    Generated using TypeDoc

    \ No newline at end of file +
    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

    +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index.PrettyOptionsExtra.html b/interfaces/index.PrettyOptionsExtra.html index c07d080..5e4d9a3 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;
        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;
        redactCwd?: boolean;
        padLevels?: boolean;
    }

    Hierarchy (view full)

    Properties

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

    NOTE: Only applies to log message and errors. If you need to redact arbitrary properties you should use pino's redact or pino-pretty's customPrettifiers

    Default

    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

    Default

    true
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index._internal_.FileLogOptionsStrong.html b/interfaces/index._internal_.FileLogOptionsStrong.html index 15d18e9..fef0974 100644 --- a/interfaces/index._internal_.FileLogOptionsStrong.html +++ b/interfaces/index._internal_.FileLogOptionsStrong.html @@ -1,4 +1,4 @@ -FileLogOptionsStrong | @foxxmd/logging Docs
    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? +FileLogOptionsStrong | @foxxmd/logging Docs
    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 @@ -8,12 +8,12 @@

    Numerical values will be considered as MB.

    Default

    '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.

    Default

    '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
    • @@ -31,11 +31,11 @@

    Default

    '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 the current working directory.

    Type declaration

      • (): string
      • Returns string

    Default

    'CWD/logs/app.log'
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index._internal_.FileOptions.html b/interfaces/index._internal_.FileOptions.html index a655a51..bf2e4fb 100644 --- a/interfaces/index._internal_.FileOptions.html +++ b/interfaces/index._internal_.FileOptions.html @@ -1,4 +1,4 @@ -FileOptions | @foxxmd/logging Docs
    interface FileOptions {
        size?: string | number;
        frequency?: number | "daily" | "hourly";
        timestamp?: "unix" | "iso" | "auto";
        path?: string | (() => string);
    }

    Hierarchy (view full)

    Properties

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

    Hierarchy (view full)

    Properties

    size? frequency? timestamp? path? @@ -7,12 +7,12 @@

    Numerical values will be considered as MB.

    Default

    '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.

    Default

    '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
    • @@ -30,10 +30,10 @@

    Default

    '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 the current working directory.

    Type declaration

      • (): string
      • Returns string

    Default

    'CWD/logs/app.log'
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index._internal_.PinoRollOptions.html b/interfaces/index._internal_.PinoRollOptions.html index 1baf8b4..523b82a 100644 --- a/interfaces/index._internal_.PinoRollOptions.html +++ b/interfaces/index._internal_.PinoRollOptions.html @@ -1,13 +1,13 @@ -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.

    Numerical values will be considered as MB.

    Default

    '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.

    Default

    'daily'
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/interfaces/index._internal_.RollOptions.html b/interfaces/index._internal_.RollOptions.html index f8de0a2..3e6da1d 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

      @@ -17,4 +17,4 @@

    Default

    'auto'
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/modules/factory.html b/modules/factory.html index 38c360c..69ed07d 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

    Variables

    PRETTY_OPTS_CONSOLE diff --git a/modules/index.html b/modules/index.html index 9511073..584ef62 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 893ab09..d1bfd62 100644 --- a/types/factory.FileDestination.html +++ b/types/factory.FileDestination.html @@ -1 +1 @@ -FileDestination | @foxxmd/logging Docs
    FileDestination: Omit<PrettyOptionsExtra, "destination" | "sync"> & FileOptionsParsed

    Generated using TypeDoc

    \ No newline at end of file +FileDestination | @foxxmd/logging Docs
    FileDestination: Omit<PrettyOptionsExtra, "destination" | "sync"> & FileOptionsParsed

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/factory.StreamDestination.html b/types/factory.StreamDestination.html index aab041d..7188940 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;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file +StreamDestination | @foxxmd/logging Docs
    StreamDestination: Omit<PrettyOptionsExtra, "destination"> & {
        destination: number | DestinationStream | WritableStream;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/factory._internal_.FileOptionsParsed.html b/types/factory._internal_.FileOptionsParsed.html index 2c568da..0e2d40a 100644 --- a/types/factory._internal_.FileOptionsParsed.html +++ b/types/factory._internal_.FileOptionsParsed.html @@ -1 +1 @@ -FileOptionsParsed | @foxxmd/logging Docs
    FileOptionsParsed: MarkRequired<FileOptions, "path">

    Generated using TypeDoc

    \ No newline at end of file +FileOptionsParsed | @foxxmd/logging Docs
    FileOptionsParsed: MarkRequired<FileOptions, "path">

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/factory._internal_.PinoLoggerOptions.html b/types/factory._internal_.PinoLoggerOptions.html index 78fec74..236deb2 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

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/index.LogData.html b/types/index.LogData.html index 9e7555d..0d11794 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

    -

    Type declaration

    • level: number
    • time: number
    • pid: number
    • hostname: string
    • labels: any[]
    • msg: string | Error

    Generated using TypeDoc

    \ No newline at end of file +

    Type declaration

    • level: number
    • time: number
    • pid: number
    • hostname: string
    • labels: any[]
    • msg: string | Error

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/index.LogLevel.html b/types/index.LogLevel.html index f6d62d6..348812d 100644 --- a/types/index.LogLevel.html +++ b/types/index.LogLevel.html @@ -1 +1 @@ -LogLevel | @foxxmd/logging Docs
    LogLevel: typeof LOG_LEVEL_NAMES[number]

    Generated using TypeDoc

    \ No newline at end of file +LogLevel | @foxxmd/logging Docs
    LogLevel: typeof LOG_LEVEL_NAMES[number]

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/index.LogLevelStreamEntry.html b/types/index.LogLevelStreamEntry.html index a0d8b6e..39c8f11 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

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/index.Logger.html b/types/index.Logger.html index e69a7fb..fb68d8c 100644 --- a/types/index.Logger.html +++ b/types/index.Logger.html @@ -1 +1 @@ -Logger | @foxxmd/logging Docs
    Logger: Logger<LogLevel> & {
        labels: any[];
        addLabel: ((value) => void);
    }

    Type declaration

    • labels: any[]
    • addLabel: ((value) => void)
        • (value): void
        • Parameters

          • value: any

          Returns void

    Generated using TypeDoc

    \ No newline at end of file +Logger | @foxxmd/logging Docs
    Logger: Logger<LogLevel> & {
        labels: any[];
        addLabel: ((value) => void);
    }

    Type declaration

    • labels: any[]
    • addLabel: ((value) => void)
        • (value): void
        • Parameters

          • value: any

          Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/index._internal_.FileLogOptionsParsed.html b/types/index._internal_.FileLogOptionsParsed.html index 430d142..d8f890b 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

    Generated using TypeDoc

    \ No newline at end of file +FileLogOptionsParsed | @foxxmd/logging Docs
    FileLogOptionsParsed: Omit<FileLogOptions, "file"> & {
        level: false;
    } | FileLogOptionsStrong

    Generated using TypeDoc

    \ No newline at end of file diff --git a/types/index._internal_.LogOptionsParsed.html b/types/index._internal_.LogOptionsParsed.html index f383391..635f218 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;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file +LogOptionsParsed | @foxxmd/logging Docs
    LogOptionsParsed: Omit<Required<LogOptions>, "file"> & {
        file: FileLogOptionsParsed;
    }

    Type declaration

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/factory.PRETTY_COLORS.html b/variables/factory.PRETTY_COLORS.html index b3d1f49..8227176 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

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/factory.PRETTY_COLORS_STR.html b/variables/factory.PRETTY_COLORS_STR.html index fc115db..fba28d4 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

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/factory.PRETTY_ISO8601.html b/variables/factory.PRETTY_ISO8601.html index bab26f2..1458447 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

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/factory.PRETTY_OPTS_CONSOLE.html b/variables/factory.PRETTY_OPTS_CONSOLE.html index 730f85d..60529ed 100644 --- a/variables/factory.PRETTY_OPTS_CONSOLE.html +++ b/variables/factory.PRETTY_OPTS_CONSOLE.html @@ -1,4 +1,4 @@ PRETTY_OPTS_CONSOLE | @foxxmd/logging Docs

    Variable PRETTY_OPTS_CONSOLEConst

    PRETTY_OPTS_CONSOLE: PrettyOptions_ = ...

    Pre-defined pino-pretty PrettyOptions for use with console/stream output

    Source

    const PRETTY_OPTS_CONSOLE: PrettyOptions = prettyOptsConsoleFactory()
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/factory.PRETTY_OPTS_FILE.html b/variables/factory.PRETTY_OPTS_FILE.html index f136096..e625b0c 100644 --- a/variables/factory.PRETTY_OPTS_FILE.html +++ b/variables/factory.PRETTY_OPTS_FILE.html @@ -1,4 +1,4 @@ PRETTY_OPTS_FILE | @foxxmd/logging Docs

    Variable PRETTY_OPTS_FILEConst

    PRETTY_OPTS_FILE: PrettyOptions_ = ...

    Pre-defined pino-pretty PrettyOptions for use with file output

    Source

    const PRETTY_OPTS_FILE: PrettyOptions = prettyOptsFileFactory()
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/index.LOG_LEVEL_NAMES.html b/variables/index.LOG_LEVEL_NAMES.html index b6e4cf3..49e8385 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"] = ...

    Generated using TypeDoc

    \ No newline at end of file +LOG_LEVEL_NAMES | @foxxmd/logging Docs

    Variable LOG_LEVEL_NAMESConst

    LOG_LEVEL_NAMES: readonly ["silent", "fatal", "error", "warn", "info", "log", "verbose", "debug"] = ...

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/index.loggerDebug.html b/variables/index.loggerDebug.html index 177f02c..df99e74 100644 --- a/variables/index.loggerDebug.html +++ b/variables/index.loggerDebug.html @@ -1,4 +1,4 @@ loggerDebug | @foxxmd/logging Docs

    Variable loggerDebugConst

    loggerDebug: Logger = ...

    A logger that ONLY logs to console at minimum 'debug' level. Useful for logging during startup before a loggerApp has been initialized

    Source

    const loggerDebug = buildLogger('debug', [buildDestinationStdout('debug')])
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/variables/index.loggerTest.html b/variables/index.loggerTest.html index e041c5e..c6ba7eb 100644 --- a/variables/index.loggerTest.html +++ b/variables/index.loggerTest.html @@ -1,4 +1,4 @@ loggerTest | @foxxmd/logging Docs

    Variable loggerTestConst

    loggerTest: Logger = ...

    A noop (no output) logger for use when testing a component that requires a Logger

    Source

    const loggerTest = buildLogger('silent', [buildDestinationStdout('debug')])
     
    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file