IFClite TypeScript API
    Preparing search index...

    Function createLogger

    • Create a logger instance for a specific component

      Parameters

      • component: string

      Returns {
          caught(message: string, error: unknown, ctx?: Partial<LogContext>): void;
          debug(message: string, data?: unknown, ctx?: Partial<LogContext>): void;
          error(message: string, error?: unknown, ctx?: Partial<LogContext>): void;
          info(message: string, ctx?: Partial<LogContext>): void;
          warn(message: string, ctx?: Partial<LogContext>): void;
      }

      • caught: function
        • Log a caught error with context - visible when IFC_DEBUG=true Use in catch blocks where the error is handled/recovered

          Parameters

          • message: string
          • error: unknown
          • Optionalctx: Partial<LogContext>

          Returns void

      • debug: function
        • Log debug - only visible when IFC_DEBUG=true Use for detailed debugging information

          Parameters

          • message: string
          • Optionaldata: unknown
          • Optionalctx: Partial<LogContext>

          Returns void

      • error: function
        • Log an error - always visible in console Use for critical failures that affect functionality

          Parameters

          • message: string
          • Optionalerror: unknown
          • Optionalctx: Partial<LogContext>

          Returns void

      • info: function
        • Log info - only visible when IFC_DEBUG=true Use for general operational information

          Parameters

          Returns void

      • warn: function
        • Log a warning - always visible in console Use for recoverable issues or degraded functionality

          Parameters

          Returns void