diff --git a/functions/factory.buildDestinationFile.html b/functions/factory.buildDestinationFile.html index aa2afa1..0d59e33 100644 --- a/functions/factory.buildDestinationFile.html +++ b/functions/factory.buildDestinationFile.html @@ -1 +1 @@ -buildDestinationFile | @foxxmd/logging Docs

Generated using TypeDoc

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

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationRollingFile.html b/functions/factory.buildDestinationRollingFile.html index 651ed12..255d31b 100644 --- a/functions/factory.buildDestinationRollingFile.html +++ b/functions/factory.buildDestinationRollingFile.html @@ -1 +1 @@ -buildDestinationRollingFile | @foxxmd/logging Docs

Function buildDestinationRollingFile

Generated using TypeDoc

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

Function buildDestinationRollingFile

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStderr.html b/functions/factory.buildDestinationStderr.html index b2c8d89..b38eab0 100644 --- a/functions/factory.buildDestinationStderr.html +++ b/functions/factory.buildDestinationStderr.html @@ -1 +1 @@ -buildDestinationStderr | @foxxmd/logging Docs

Generated using TypeDoc

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

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStdout.html b/functions/factory.buildDestinationStdout.html index e644e7f..a6c497a 100644 --- a/functions/factory.buildDestinationStdout.html +++ b/functions/factory.buildDestinationStdout.html @@ -1 +1 @@ -buildDestinationStdout | @foxxmd/logging Docs

Generated using TypeDoc

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

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildDestinationStream.html b/functions/factory.buildDestinationStream.html index 05b16e2..5561c9c 100644 --- a/functions/factory.buildDestinationStream.html +++ b/functions/factory.buildDestinationStream.html @@ -1 +1 @@ -buildDestinationStream | @foxxmd/logging Docs

Generated using TypeDoc

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

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.buildLogger.html b/functions/factory.buildLogger.html index b14cb75..f755948 100644 --- a/functions/factory.buildLogger.html +++ b/functions/factory.buildLogger.html @@ -1 +1 @@ -buildLogger | @foxxmd/logging Docs

Generated using TypeDoc

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

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/factory.prettyOptsFactory.html b/functions/factory.prettyOptsFactory.html index b12a016..cb45d3e 100644 --- a/functions/factory.prettyOptsFactory.html +++ b/functions/factory.prettyOptsFactory.html @@ -1 +1 @@ -prettyOptsFactory | @foxxmd/logging Docs

Generated using TypeDoc

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

Generated using TypeDoc

\ No newline at end of file diff --git a/functions/index.childLogger.html b/functions/index.childLogger.html index 6765650..144594d 100644 --- a/functions/index.childLogger.html +++ b/functions/index.childLogger.html @@ -1 +1 @@ -childLogger | @foxxmd/logging Docs
  • Parameters

    • parent: Logger
    • labelsVal: any = []
    • context: object = {}
    • options: {} = {}

      Returns Logger

    Generated using TypeDoc

    \ No newline at end of file +childLogger | @foxxmd/logging Docs
    • Parameters

      • parent: Logger
      • labelsVal: any = []
      • context: object = {}
      • options: {} = {}

        Returns Logger

      Generated using TypeDoc

      \ No newline at end of file diff --git a/functions/index.isLogOptions.html b/functions/index.isLogOptions.html index 284dcbd..50e2746 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 5dc0831..71537a6 100644 --- a/functions/index.loggerApp.html +++ b/functions/index.loggerApp.html @@ -1 +1 @@ -loggerApp | @foxxmd/logging Docs

      Generated using TypeDoc

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

      Generated using TypeDoc

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

      Generated using TypeDoc

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

      Generated using TypeDoc

      \ No newline at end of file diff --git a/functions/index.parseLogOptions.html b/functions/index.parseLogOptions.html index 9fb015a..821dfd9 100644 --- a/functions/index.parseLogOptions.html +++ b/functions/index.parseLogOptions.html @@ -1 +1 @@ -parseLogOptions | @foxxmd/logging Docs

      Generated using TypeDoc

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

      Generated using TypeDoc

      \ No newline at end of file diff --git a/index.html b/index.html index 8b72e1c..6237d47 100644 --- a/index.html +++ b/index.html @@ -20,8 +20,7 @@ - - +example log output

      Install

      npm install @foxxmd/logging
       
      diff --git a/interfaces/index.LogOptions.html b/interfaces/index.LogOptions.html index f2c582a..8092606 100644 --- a/interfaces/index.LogOptions.html +++ b/interfaces/index.LogOptions.html @@ -1,4 +1,4 @@ -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";
          filePath?: string | (() => string);
          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";
          filePath?: string | (() => string);
          console?: "silent" | "fatal" | "error" | "warn" | "info" | "log" | "verbose" | "debug";
      }

      Properties

      level? file? filePath? console? @@ -6,11 +6,11 @@

      Defaults to env LOG_LEVEL or info if not specified.

      Default

      'info'
       
      -
      file?: 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.

      -
      filePath?: string | (() => string)

      The full path and filename to use for log files

      +
      file?: 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.

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

      The full 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

      Type declaration

        • (): string
        • Returns string

      Default

      'CWD/logs/app.log'
       
      -
      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 +
      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/modules/factory.html b/modules/factory.html index 42589c0..7d29d26 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

      prettyConsole diff --git a/modules/index.html b/modules/index.html index ba5488c..33373e7 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

      Type Aliases

      LogLevel Logger diff --git a/types/factory.FileDestination.html b/types/factory.FileDestination.html index 8a2cd3a..b9174a2 100644 --- a/types/factory.FileDestination.html +++ b/types/factory.FileDestination.html @@ -1 +1 @@ -FileDestination | @foxxmd/logging Docs
      FileDestination: Omit<PrettyOptions_, "destination" | "sync"> & {
          path: string | (() => string);
      }

      Type declaration

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

      Generated using TypeDoc

      \ No newline at end of file +FileDestination | @foxxmd/logging Docs
      FileDestination: Omit<PrettyOptions_, "destination" | "sync"> & {
          path: string | (() => string);
      }

      Type declaration

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

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/factory.StreamDestination.html b/types/factory.StreamDestination.html index 52862ce..c010110 100644 --- a/types/factory.StreamDestination.html +++ b/types/factory.StreamDestination.html @@ -1 +1 @@ -StreamDestination | @foxxmd/logging Docs
      StreamDestination: Omit<PrettyOptions_, "destination"> & {
          destination: number | DestinationStream | WritableStream;
      }

      Type declaration

      Generated using TypeDoc

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

      Type declaration

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index.LogData.html b/types/index.LogData.html index 67238b1..395056d 100644 --- a/types/index.LogData.html +++ b/types/index.LogData.html @@ -1 +1 @@ -LogData | @foxxmd/logging Docs
      LogData: Record<string, any> & {
          level: number;
          time: number;
          pid: number;
          hostname: string;
          labels: any[];
          msg: string | Error | ErrorWithCause;
      }

      Type declaration

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

      Generated using TypeDoc

      \ No newline at end of file +LogData | @foxxmd/logging Docs
      LogData: Record<string, any> & {
          level: number;
          time: number;
          pid: number;
          hostname: string;
          labels: any[];
          msg: string | Error | ErrorWithCause;
      }

      Type declaration

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

      Generated using TypeDoc

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

      Generated using TypeDoc

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

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index.LogLevelStreamEntry.html b/types/index.LogLevelStreamEntry.html index 03813df..59f8691 100644 --- a/types/index.LogLevelStreamEntry.html +++ b/types/index.LogLevelStreamEntry.html @@ -1 +1 @@ -LogLevelStreamEntry | @foxxmd/logging Docs

      Type alias LogLevelStreamEntry

      LogLevelStreamEntry: StreamEntry<LogLevel>

      Generated using TypeDoc

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

      Type alias LogLevelStreamEntry

      LogLevelStreamEntry: StreamEntry<LogLevel>

      Generated using TypeDoc

      \ No newline at end of file diff --git a/types/index.Logger.html b/types/index.Logger.html index 9fc4399..9abbb79 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/variables/factory.prettyConsole.html b/variables/factory.prettyConsole.html index e56b6a1..529d7ac 100644 --- a/variables/factory.prettyConsole.html +++ b/variables/factory.prettyConsole.html @@ -1 +1,4 @@ -prettyConsole | @foxxmd/logging Docs

      Variable prettyConsoleConst

      prettyConsole: PrettyOptions_ = ...

      Generated using TypeDoc

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

      Variable prettyConsoleConst

      prettyConsole: PrettyOptions_ = ...

      Pre-defined pretty options for use with console/stream output

      +

      Source

      const prettyConsole: PrettyOptions = prettyOptsFactory({sync: true})
      +
      +

      Generated using TypeDoc

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

      Variable prettyFileConst

      prettyFile: PrettyOptions_ = ...

      Generated using TypeDoc

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

      Variable prettyFileConst

      prettyFile: PrettyOptions_ = ...

      Pre-defined pretty options for use with file output

      +

      Source

      const prettyFile: PrettyOptions = prettyOptsFactory({
      colorize: false,
      sync: false,
      }) +
      +

      Generated using TypeDoc

      \ No newline at end of file diff --git a/variables/index.LOG_LEVELS.html b/variables/index.LOG_LEVELS.html index 8487767..03c8b6b 100644 --- a/variables/index.LOG_LEVELS.html +++ b/variables/index.LOG_LEVELS.html @@ -1 +1 @@ -LOG_LEVELS | @foxxmd/logging Docs

      Variable LOG_LEVELSConst

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

      Generated using TypeDoc

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

      Variable LOG_LEVELSConst

      LOG_LEVELS: 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 e7f6054..0b14b51 100644 --- a/variables/index.loggerDebug.html +++ b/variables/index.loggerDebug.html @@ -1 +1,4 @@ -loggerDebug | @foxxmd/logging Docs

      Variable loggerDebugConst

      loggerDebug: Logger = ...

      Generated using TypeDoc

      \ No newline at end of file +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 diff --git a/variables/index.loggerTest.html b/variables/index.loggerTest.html index 3980149..4e0c815 100644 --- a/variables/index.loggerTest.html +++ b/variables/index.loggerTest.html @@ -1 +1,4 @@ -loggerTest | @foxxmd/logging Docs

      Variable loggerTestConst

      loggerTest: Logger = ...

      Generated using TypeDoc

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