diff --git a/CMakeLists.txt b/CMakeLists.txt index d6315a7..508fdd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 4.0.0) -project(EchoionApi VERSION 1.0.0 LANGUAGES CXX) +if(NOT DEFINED ECHOION_PRODUCT_VERSION) + set(ECHOION_PRODUCT_VERSION 0.0.0) +endif() +project(EchoionApi VERSION "${ECHOION_PRODUCT_VERSION}" LANGUAGES CXX) set(CMAKE_CXX_STANDARD 26) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/include/echoion/api/config/ConfigTypes.hpp b/include/echoion/api/config/ConfigTypes.hpp index 2aa4cb1..be7d6eb 100644 --- a/include/echoion/api/config/ConfigTypes.hpp +++ b/include/echoion/api/config/ConfigTypes.hpp @@ -197,6 +197,16 @@ namespace Echoion::Api uint32_t tempCleanupInterval = 3600; // seconds }; + // Process logging. The active file is always archived at process startup, + // then rotated by size while the bot is running. + struct LoggingConfig { + bool console = true; + std::string level = "debug"; + std::string fileName = "echoion.log"; + uint64_t maxFileSizeBytes = 10 * 1024 * 1024; + uint32_t maxFiles = 10; + }; + // Component updater. Runtime means the complete relocatable daemon bundle, // not only the echoiond ELF. Core and managed extension plugins may use // independent channels, but the updater still enforces the compatibility @@ -294,6 +304,7 @@ namespace Echoion::Api SecurityConfig security; FeaturesConfig features; AdvancedConfig advanced; + LoggingConfig logging; UpdatesConfig updates; UrlShorteningConfig urlShortening; PluginsConfig plugins;