include/entropic/types/session_logger.h

← API

include/entropic/types/session_logger.h

entropic::SessionLogger

Manages session_model.log for raw streaming content.

entropic::SessionLogger::SessionLogger(const std::filesystem::path &log_dir)

Construct with log directory.

Opens session_model.log for append.

Parameters
  • log_dir — Directory for session_model.log.

entropic::SessionLogger::~SessionLogger()

Close the model log file.

entropic::SessionLogger::SessionLogger(const SessionLogger &)=delete

Non-copyable.

SessionLogger & entropic::SessionLogger::operator=(const SessionLogger &)=delete

void entropic::SessionLogger::log_user_input(const std::string &input)

Log user input at the start of a turn.

Parameters
  • input — User input string.

void entropic::SessionLogger::log_raw_token(const char *token, size_t len)

Log a raw token from streaming output.

Parameters
  • token — Token data.
  • len — Token length.

void entropic::SessionLogger::end_turn()

End the current assistant turn.

bool entropic::SessionLogger::is_open() const

Check if the logger is open and writable.

Returns
true if FILE* is valid.

void entropic::SessionLogger::raw_token_callback(const char *token, size_t len, void *user_data)

Static callback for StreamThinkFilter raw output.

Matches the signature expected by StreamThinkFilter::set_raw_callback. The user_data pointer must be a SessionLogger*.

Parameters
  • token — Token data.
  • len — Token length.
  • user_data — SessionLogger pointer.