@salesforce/agents
    Preparing search index...

    Class CtxLogger

    A thin wrapper around a @salesforce/core Logger that emits msg-ctx log lines.

    Each level method renders fields into the message prefix AND passes the same fields object as the logger's structured-fields argument, so the human-readable rendering and the structured source-of-truth are guaranteed identical — eliminating the drift that a manual logger.debug(msgCtx(m, ctx), ctx) two-arg call risks.

    Construct one per component with CtxLogger.child, mirroring Logger.childFromRoot, then call it like an ordinary logger:

    const logger = CtxLogger.child('AgentPublisher');
    logger.debug('Publishing agent', { developerName });
    logger.warn('Failed to trigger indexing', { libraryId, errName, errMsg });
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      • message: string
      • fields: Record<string, unknown> = {}

      Returns void

    • Parameters

      • message: string
      • fields: Record<string, unknown> = {}

      Returns void

    • Parameters

      • message: string
      • fields: Record<string, unknown> = {}

      Returns void

    • Parameters

      • message: string
      • fields: Record<string, unknown> = {}

      Returns void

    • Parameters

      • message: string
      • fields: Record<string, unknown> = {}

      Returns void