From aa20bcc6eb539ab1d6a9490e1843f9ab1e025155 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 23 Mar 2014 17:57:54 +0100 Subject: Add file monitor --- mmss/context.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mmss/context.cpp') 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 @@ -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()); + attach_monitor(std::make_shared(argv[2])); std::shared_ptr conf = config_t::read(this, argv[1]); -- cgit v1.2.3