diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-23 17:57:54 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-03-23 17:57:54 +0100 |
commit | aa20bcc6eb539ab1d6a9490e1843f9ab1e025155 (patch) | |
tree | 2dc0848d459c5eefa8e0264bdefc04fb1df44a1d /mmss/context.cpp | |
parent | 2096f29487ceff44f1c3e6e5b18efa8c7cb573f6 (diff) | |
download | gmrf-aa20bcc6eb539ab1d6a9490e1843f9ab1e025155.tar gmrf-aa20bcc6eb539ab1d6a9490e1843f9ab1e025155.zip |
Add file monitor
Diffstat (limited to 'mmss/context.cpp')
-rw-r--r-- | mmss/context.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mmss/context.cpp b/mmss/context.cpp index 3ab4086..656299a 100644 --- a/mmss/context.cpp +++ b/mmss/context.cpp @@ -29,6 +29,7 @@ #include "network.hpp" #include "node.hpp" +#include "monitor_file.hpp" #include "monitor_log.hpp" #include <algorithm> @@ -82,13 +83,14 @@ void context_t::logf(int priority, const char *format, ...) { } void context_t::run(int argc, char *argv[]) { - if (argc != 2) { - std::fprintf(stderr, "usage: %s config\n", argv[0]); + if (argc != 3) { + std::fprintf(stderr, "usage: %s config logfile\n", argv[0]); std::exit(1); } attach_monitor(std::make_shared<monitor_log_t>()); + attach_monitor(std::make_shared<monitor_file_t>(argv[2])); std::shared_ptr<const config_t> conf = config_t::read(this, argv[1]); |