| name | orkcore-logging |
| description | Answer questions about orkid's logging system, log channels, backends (stdout/file/HTML/HTTP), performance metrics, and Python logging integration. Use when the user asks about logging, log channels, or debug output. |
| user-invocable | false |
Orkid Logging System Reference
When answering questions about logging in orkid, consult these files.
Key Files
| Component | Location |
|---|
| Logger Header | ork.core/inc/ork/util/logger.h |
| Logger Impl | ork.core/src/util/logger.cpp |
| Stdout Backend | ork.core/src/util/logger_stdout.cpp |
| File Backend | ork.core/src/util/logger_file.cpp |
| HTML Backend | ork.core/src/util/logger_html.cpp |
| HTTP Backend | ork.core/src/util/logger_http.cpp |
| Python Bindings | ork.core/pyext/pyext_logger.cpp |
Usage
from orkengine import core
logger = core.Logger.instance()
chan = logger.getChannel("MYAPP")
chan = logger.configureChannel("MYAPP", core.fvec3(0.5, 0.8, 1.0), True)
chan.log("message")
chan.warn("warning")
chan.error("error")
chan.status("sub", "msg")
chan.log_begin("start")
chan.log_continue("middle")
chan.log_end()
chan.enabled = True
C++ Pattern
static logchannel_ptr_t logchan_mymod = logger()->getChannel("MYMOD");
logchan_mymod->log("Processing %d items", count);
logchan_mymod->warn("Unexpected state");
Performance Metrics
chan.perfItem("fps", 60.0)
chan.perfItem("frame_time", lambda: get_frame_time())
chan.perf_interval = 0.001
chan.status_interval = 8.0
Backends
| Backend | Env Config | Purpose |
|---|
| Stdout | ORKID_LOGGER_BACKEND=STDOUT | Console (default) |
| File | ORKID_LOGGER_BACKEND=FILE | Async file write |
| HTML | ORKID_LOGGER_BACKEND=HTML | Interactive HTML log |
| HTTP | ORKID_LOGGER_BACKEND=HTTP | Live streaming via ZMQ+SSE |
| Fork | ORKID_LOGGER_BACKEND=[STDOUT,FILE] | Multiple backends |
File options: ORKID_LOGGER_FILE_ANSI=1, ORKID_LOGGER_FILE_FLUSH_MS=100
Channel Filtering (Environment)
ORKID_LOGCHAN_0=1
ORKID_LOGCHAN_CATALOG=1
ORKID_LOGCHAN_GPU0=0
ORKID_LOG_DISABLE=1
How to Answer
- For API: read
logger.h for channel methods
- For backends: check
logger_*.cpp implementations
- No log levels — use
log() vs warn() vs error() for severity
- Channels use plain
std::string names, not CrcStrings