| 63 | } |
| 64 | |
| 65 | void ReloadConfig() { |
| 66 | LOG_INFO("Reloading config: {}", g_configPath); |
| 67 | |
| 68 | const Config::LoadResult result = Config::Load(g_configPath); |
| 69 | if (!result.applied) { |
| 70 | LOG_WARN("Config reload skipped; keeping previous valid config"); |
| 71 | return; |
| 72 | } |
| 73 | |
| 74 | Log::ApplyConfigLevel(); |
| 75 | |
| 76 | if (result.luaPathsChanged) { |
| 77 | RestartLuaWatcher(); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | void WatcherThread() { |
| 82 | const std::filesystem::path configPath(g_configPath); |
no test coverage detected