GeoLeaf Core API - v3.0.0
    Preparing search index...

    Variable ErrorLoggerConst

    ErrorLogger: {
        LEVELS: { ERROR: "error"; WARN: "warn"; INFO: "info"; DEBUG: "debug" };
        error(module: string, message: string, error?: unknown): void;
        warn(module: string, message: string): void;
        info(module: string, message: string): void;
        debug(module: string, message: string): void;
        quotaError(module: string, available: number, needed: number): void;
        networkError(
            module: string,
            url: string,
            status: string | number,
            error?: unknown,
        ): void;
        validationError(
            module: string,
            field: string,
            expectedFormat: string,
        ): void;
        idbError(module: string, operation: string, error?: unknown): void;
        performance(module: string, operation: string, milliseconds: number): void;
        memoryWarning(module: string, usedMB: number): void;
        operation(module: string, operation: string): ErrorLoggerOperationContext;
    } = ...

    Module-tagged error reporting, layered on top of Log.

    Where Log takes a free-form message, every method here takes the emitting module as its first argument and renders [module] message, so the origin is uniform across the codebase instead of being re-typed at each call site.

    Two behaviours worth knowing: error() also prints the stack when the value carries one, and every method guards on Log being present — this module is reachable before boot and in consumers that tree-shook the logger, where debug() falls back to the console directly rather than recursing.

    Type Declaration

    • LEVELS: { ERROR: "error"; WARN: "warn"; INFO: "info"; DEBUG: "debug" }
    • error: function
      • Parameters

        • module: string
        • message: string
        • Optionalerror: unknown

        Returns void

    • warn: function
    • info: function
    • debug: function
    • quotaError: function
      • Parameters

        • module: string
        • available: number
        • needed: number

        Returns void

    • networkError: function
      • Parameters

        • module: string
        • url: string
        • status: string | number
        • Optionalerror: unknown

        Returns void

    • validationError: function
      • Parameters

        • module: string
        • field: string
        • expectedFormat: string

        Returns void

    • idbError: function
      • Parameters

        • module: string
        • operation: string
        • Optionalerror: unknown

        Returns void

    • performance: function
      • Parameters

        • module: string
        • operation: string
        • milliseconds: number

        Returns void

    • memoryWarning: function
    • operation: function
      • Parameters

        • module: string
        • operation: string

        Returns ErrorLoggerOperationContext