Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2503244b3 |
@@ -197,14 +197,49 @@ 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.
|
||||
// Process logging. Split mode writes exact-level files (trace.log,
|
||||
// debug.log, ...) and optionally all.log. Set splitByLevel=false to keep
|
||||
// the legacy single rotating file.
|
||||
struct LoggingConfig {
|
||||
bool console = true;
|
||||
std::string level = "debug";
|
||||
bool splitByLevel = true;
|
||||
bool combined = true;
|
||||
std::string fileName = "echoion.log";
|
||||
uint64_t maxFileSizeBytes = 10 * 1024 * 1024;
|
||||
uint32_t maxFiles = 10;
|
||||
// "pattern", "json" (JSON Lines), or "logfmt".
|
||||
std::string format = "pattern";
|
||||
std::string pattern =
|
||||
"[{time}] [{level}] [{thread}] {file} - {message}";
|
||||
// "async", "immediate", or "buffered".
|
||||
std::string mode = "async";
|
||||
uint32_t queueCapacity = 2048;
|
||||
// "block", "drop-newest", or "drop-oldest".
|
||||
std::string overflowPolicy = "block";
|
||||
};
|
||||
|
||||
// EchoionLicensing issues short-lived signed leases. The activation token
|
||||
// is read from the named environment variable and is never written to the
|
||||
// configuration file. Release builds provide the root trust anchor at
|
||||
// compile time; developmentKeys are accepted only by explicitly opted-in
|
||||
// development builds.
|
||||
struct LicensePublicKey {
|
||||
std::string id;
|
||||
std::string ed25519;
|
||||
};
|
||||
|
||||
struct LicensingConfig {
|
||||
bool required = false;
|
||||
std::string serviceUrl;
|
||||
std::string productId = "echoion";
|
||||
std::string activationTokenEnv = "ECHOION_LICENSE_TOKEN";
|
||||
std::chrono::milliseconds refreshInterval = std::chrono::hours(6);
|
||||
std::chrono::milliseconds retryInterval = std::chrono::minutes(5);
|
||||
std::chrono::milliseconds maximumLeaseLifetime =
|
||||
std::chrono::hours(24);
|
||||
bool developmentMode = false;
|
||||
std::vector<LicensePublicKey> developmentKeys;
|
||||
};
|
||||
|
||||
// Component updater. Runtime means the complete relocatable daemon bundle,
|
||||
@@ -315,6 +350,7 @@ namespace Echoion::Api
|
||||
FeaturesConfig features;
|
||||
AdvancedConfig advanced;
|
||||
LoggingConfig logging;
|
||||
LicensingConfig licensing;
|
||||
UpdatesConfig updates;
|
||||
UrlShorteningConfig urlShortening;
|
||||
PluginsConfig plugins;
|
||||
|
||||
Reference in new issue
Block a user