Software / code / prosody
Comparison
util/startup.lua @ 8721:b773b15fee71
util.startup: Set up event hooks for reloading logging here instead of in loggingmanager to simplify startup dependencies
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 05 Apr 2018 17:53:51 +0200 |
| parent | 8720:dba17a70fd22 |
| child | 8728:41c959c5c84b |
comparison
equal
deleted
inserted
replaced
| 8720:dba17a70fd22 | 8721:b773b15fee71 |
|---|---|
| 82 server = require "net.server" | 82 server = require "net.server" |
| 83 end | 83 end |
| 84 | 84 |
| 85 function startup.init_logging() | 85 function startup.init_logging() |
| 86 -- Initialize logging | 86 -- Initialize logging |
| 87 require "core.loggingmanager" | 87 local loggingmanager = require "core.loggingmanager" |
| 88 loggingmanager.reload_logging(); | |
| 89 prosody.events.add_handler("reopen-log-files", function () | |
| 90 loggingmanager.reload_logging(); | |
| 91 prosody.events.fire_event("logging-reloaded"); | |
| 92 end); | |
| 88 end | 93 end |
| 89 | 94 |
| 90 function startup.log_dependency_warnings() | 95 function startup.log_dependency_warnings() |
| 91 dependencies.log_warnings(); | 96 dependencies.log_warnings(); |
| 92 end | 97 end |