diff options
| author | Dan Engelbrecht <[email protected]> | 2023-09-22 10:04:02 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-22 16:04:02 +0200 |
| commit | 47ba787e2cfe32b252b74e09494fbcaabc4e8190 (patch) | |
| tree | 80acc5dfa51b08211583e38d31be2b2327a525a3 /src/zenserver/admin/admin.h | |
| parent | added support for sln on Mac (#421) (diff) | |
| download | zen-47ba787e2cfe32b252b74e09494fbcaabc4e8190.tar.xz zen-47ba787e2cfe32b252b74e09494fbcaabc4e8190.zip | |
Add runtime status/control of logging (#419)
- Feature: New endpoint `/admin/logs` to query status of logging and log file locations and cache logging
- `enablewritelog`=`true`/`false` parameter to control cache write logging
- `enableaccesslog`=`true`/`false` parameter to control cache access logging
- `loglevel` = `trace`/`debug`/`info`/`warning`/`error`
- Feature: New zen command `logs` to query/control zen logging
- No arguments gives status of logging and paths to log files
- `--cache-write-log` `enable`/`disable` to control cache write logging
- `--cache-access-log` `enable`/`disable` to control cache access logging
- `--loglevel` `trace`/`debug`/`info`/`warning`/`error` to set debug level
Diffstat (limited to 'src/zenserver/admin/admin.h')
| -rw-r--r-- | src/zenserver/admin/admin.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/zenserver/admin/admin.h b/src/zenserver/admin/admin.h index 3152f87ab..12a47f29e 100644 --- a/src/zenserver/admin/admin.h +++ b/src/zenserver/admin/admin.h @@ -9,11 +9,18 @@ namespace zen { class GcScheduler; class JobQueue; +class ZenCacheStore; class HttpAdminService : public zen::HttpService { public: - HttpAdminService(GcScheduler& Scheduler, JobQueue& BackgroundJobQueue); + struct LogPaths + { + std::filesystem::path AbsLogPath; + std::filesystem::path HttpLogPath; + std::filesystem::path CacheLogPath; + }; + HttpAdminService(GcScheduler& Scheduler, JobQueue& BackgroundJobQueue, ZenCacheStore& CacheStore, const LogPaths& LogPaths); ~HttpAdminService(); virtual const char* BaseUri() const override; @@ -23,6 +30,8 @@ private: HttpRequestRouter m_Router; GcScheduler& m_GcScheduler; JobQueue& m_BackgroundJobQueue; + ZenCacheStore& m_CacheStore; + LogPaths m_LogPaths; }; } // namespace zen |