Class Slf4jLLMCallPublisher

java.lang.Object
com.tnsai.llm.observability.Slf4jLLMCallPublisher
All Implemented Interfaces:
LLMCallPublisher

public final class Slf4jLLMCallPublisher extends Object implements LLMCallPublisher
Default LLMCallPublisher that emits one structured SLF4J line per LLM call (issue #79).

Failed calls log at WARN; successful calls at INFO. The line carries provider/model, elapsed milliseconds, token totals, and total USD cost — enough for ad-hoc tail-and-grep diagnostics without enabling structured trackers (LangFuse / Helicone).

Intentionally does NOT log raw prompt or response text — those are potentially PII and belong behind the redaction SPI (#80). Operators who need verbose dumps should plug in a custom publisher with their own redaction policy.

Since:
0.9.0 (issue #79)
  • Constructor Details

    • Slf4jLLMCallPublisher

      public Slf4jLLMCallPublisher()
  • Method Details