Logs

Logs collected by AMD Inference Server are placed in ~/.amdinfer/logs/ by default.

AMD Inference Server Logs

Logging in AMD Inference Server is configured in amdinfer/observation/logging.*. There are multiple knobs that can be tweaked to affect how and which log messages are captured.

// in logging.hpp
#define SPDLOG_ACTIVE_LEVEL XXX

/*
Logging must be globally configured by setting SPDLOG_ACTIVE_LEVEL to one of:
- SPDLOG_LEVEL_TRACE
- SPDLOG_LEVEL_DEBUG
- SPDLOG_LEVEL_INFO
- SPDLOG_LEVEL_WARN
- SPDLOG_LEVEL_ERROR
- SPDLOG_LEVEL_CRITICAL
- SPDLOG_LEVEL_OFF

This setting configures at compile-time the minimum logging level that's allowed.
Setting this to OFF removes all logging statements.
*/

// in logging.cpp
sink->set_level(...)
logger->set_level(...)
logger->flush_on(...)

/*
Different kinds of sinks (e.g. file, console) and loggers can have individual
run-time minimum log level settings which must be one of:
- spdlog::level::trace
- spdlog::level::debug
- spdlog::level::info
- spdlog::level::warn
- spdlog::level::error
- spdlog::level::critical
- spdlog::level::off
*/

Drogon Logs

Logging in Drogon is configured in amdinfer/servers/http_server.cpp by setting the appropriate log level when initializing the Drogon app.

// in http_server.cpp
drogon::app()
...
.setLogLevel(XXX)
...

/*
The log level must be one of:
- trantor::Logger::kTrace
- trantor::Logger::kDebug
- trantor::Logger::kInfo
- trantor::Logger::kWarn
- trantor::Logger::kError
- trantor::Logger::kFatal
*/