API: inherit product version and configure logging
This commit is contained in:
1 parent
3d61e6952f
commit
06e06b7622
2 files changed
+15
-1
No files matched your search
+4
-1
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user