Class SaninnLogger

Implements

  • ILogger

Constructors

Properties

config: LoggerConfig
consoleFunctionProxys: LoggerTypesObject<Function> = {}
consoleProxy: PatchedConsole
consoleProxyHandler: ProxyHandler<Console> = ...
LOG_TYPES_ARRAY: LoggerTypesEnum[] = Helpers.LOG_TYPES_ARRAY
____patchedConsoleForSaninnLogger___: PatchedConsole

Accessors

  • get debug(): {
        (...data): void;
        (message?, ...optionalParams): void;
    }
  • Returns {
        (...data): void;
        (message?, ...optionalParams): void;
    }

      • (...data): void
      • Parameters

        • Rest ...data: any[]

        Returns void

      • (message?, ...optionalParams): void
      • The console.debug() function is an alias for ().

        Parameters

        • Optional message: any
        • Rest ...optionalParams: any[]

        Returns void

  • get dir(): {
        (item?, options?): void;
        (obj, options?): void;
    }
  • console.dir does not accept multiparameters if you log logger.dir(x,y) y will be ignored

    Returns {
        (item?, options?): void;
        (obj, options?): void;
    }

      • (item?, options?): void
      • Parameters

        • Optional item: any
        • Optional options: any

        Returns void

      • (obj, options?): void
      • Uses util.inspect() on obj and prints the resulting string to stdout. This function bypasses any custom inspect() function defined on obj.

        Parameters

        • obj: any
        • Optional options: InspectOptions

        Returns void

  • get error(): {
        (...data): void;
        (message?, ...optionalParams): void;
    }
  • Returns {
        (...data): void;
        (message?, ...optionalParams): void;
    }

      • (...data): void
      • Parameters

        • Rest ...data: any[]

        Returns void

      • (message?, ...optionalParams): void
      • Prints to stderr with newline.

        Parameters

        • Optional message: any
        • Rest ...optionalParams: any[]

        Returns void

  • get fatal(): {
        (...data): void;
        (message?, ...optionalParams): void;
    }
  • Returns {
        (...data): void;
        (message?, ...optionalParams): void;
    }

      • (...data): void
      • Parameters

        • Rest ...data: any[]

        Returns void

      • (message?, ...optionalParams): void
      • Prints to stderr with newline.

        Parameters

        • Optional message: any
        • Rest ...optionalParams: any[]

        Returns void

  • get info(): {
        (...data): void;
        (message?, ...optionalParams): void;
    }
  • Returns {
        (...data): void;
        (message?, ...optionalParams): void;
    }

      • (...data): void
      • Parameters

        • Rest ...data: any[]

        Returns void

      • (message?, ...optionalParams): void
      • The () function is an alias for ().

        Parameters

        • Optional message: any
        • Rest ...optionalParams: any[]

        Returns void

  • get log(): {
        (...data): void;
        (message?, ...optionalParams): void;
    }
  • Returns {
        (...data): void;
        (message?, ...optionalParams): void;
    }

      • (...data): void
      • Parameters

        • Rest ...data: any[]

        Returns void

      • (message?, ...optionalParams): void
      • Prints to stdout with newline.

        Parameters

        • Optional message: any
        • Rest ...optionalParams: any[]

        Returns void

  • get warn(): {
        (...data): void;
        (message?, ...optionalParams): void;
    }
  • Returns {
        (...data): void;
        (message?, ...optionalParams): void;
    }

      • (...data): void
      • Parameters

        • Rest ...data: any[]

        Returns void

      • (message?, ...optionalParams): void
      • The () function is an alias for ().

        Parameters

        • Optional message: any
        • Rest ...optionalParams: any[]

        Returns void

Methods

  • Parameters

    • logType: LoggerTypesEnum
    • loggerProcessor: LoggerProcessor

    Returns void

  • Parameters

    • nativeConsoleFunction: Function

      The native console.log Function

    • _nativeConsoleObject: Console

      window.console / global.console

    • argumentsList: any[]

      contains all arguments sended to console.x(), including prefix, color, etc

    • logType: LoggerTypesEnum

    Returns any

    void

  • Returns void

  • Returns void

  • Parameters

    • logType: LoggerTypesEnum

    Returns {
        (...data): void;
        (message?, ...optionalParams): void;
    } | {
        (...data): void;
        (message?, ...optionalParams): void;
    } | {
        (...data): void;
        (message?, ...optionalParams): void;
    } | {
        (item?, options?): void;
        (obj, options?): void;
    } | {
        (...data): void;
        (message?, ...optionalParams): void;
    } | {
        (...data): void;
        (message?, ...optionalParams): void;
    }

  • Parameters

    • logType: LoggerTypesEnum
    • loggerProcessor: LoggerProcessor

    Returns void

  • Parameters

    • logType: LoggerTypesEnum
    • rawArgumentList: any[]

    Returns void

  • Parameters

    • level: LogLevelsEnum

    Returns void

  • Parameters

    • newPrefix: string

    Returns void

  • This function will be returned as console[log|warn|dir,etc] handle when the output is disabled with SaninnSalas#config.printToConsole = false

    Returns undefined

  • Since we need to patch the console to accept especial calls, that will be check here

    Returns void