// Lightweight logger for the injected hook. We can't see stdout from an injected // DLL, so each line is (a) streamed to the host over the shared log ring for the // in-app Log window, and (b) optionally written to %TEMP%\coop_hook.log (opt-in; // see debug_log.cpp). Thread-safe; cheap enough to leave compiled in. #pragma once namespace coop { struct LogRing; } namespace coop::hook { // Append a printf-style line to the log ring (if attached) and the file (if on). // logf = info, logw = warning, loge = error; the host colours the Log window by level. void logf(const char* fmt, ...); void logw(const char* fmt, ...); void loge(const char* fmt, ...); // Attach/detach the host's shared log ring so lines stream to the Log window. void set_log_ring(coop::LogRing* ring); } // namespace coop::hook