Class AiToolLogger

java.lang.Object
com.axelor.ai.tool.AiToolLogger

public final class AiToolLogger extends Object
What each tool call was and how it went, on one line.

Which inputs a model gets wrong is otherwise a matter of reading the code and guessing: a refusal reaches the model as a message and is gone with the turn. A chat keeps its tool parts, so the transcript can be read back — but a programmatic run persists no messages at all, and the unattended path is where a wrong call goes unwatched longest.

A refusal is logged as a warning, not an error. It is the model's mistake and the system is fine: now that a wrong field name, a wrong value and an unknown parameter are all refused rather than dropped, a model correcting itself is ordinary, and logging each one as a fault would bury the faults that are real.

The call's input is logged only under DEBUG, because it carries whatever data the model was working with — the same reason ai.logging.requests defaults to off.

  • Method Details

    • log

      public static void log(AiTool tool, AiAgent agent, String chatId, Object input, long latencyMs, String errorText)
      Records one call.
      Parameters:
      errorText - what the tool refused with, or null when it answered