From 0493a321d294a3225e680a782dbf6b5f15d70417 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 10 Mar 2016 12:23:17 -0500 Subject: [PATCH] oveeride --log for windows --- Config.h | 6 +++--- DaemonWin32.cpp | 4 +++- Makefile.mingw | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Config.h b/Config.h index 07d7ccb7..d79a9c47 100644 --- a/Config.h +++ b/Config.h @@ -30,7 +30,7 @@ namespace config { /** * @brief Parse cmdline parameters, and show help if requested * @param argc Cmdline arguments count, should be passed from main(). - * @param argv Cmdline parameters array, should be passed from main() + * @param argv Cmdline parameters array, should be passed from main() * * If --help is given in parameters, shows it's list with description * terminates the program with exitcode 0. @@ -90,10 +90,10 @@ namespace config { bool SetOption(const char *name, const T& value) { if (!m_Options.count(name)) return false; - m_Options[name] = value; + m_Options.at(name).value() = value; notify(m_Options); return true; - } + } /** * @brief Check is value explicitly given or default diff --git a/DaemonWin32.cpp b/DaemonWin32.cpp index e5de9c9a..02c602f0 100644 --- a/DaemonWin32.cpp +++ b/DaemonWin32.cpp @@ -27,7 +27,9 @@ namespace i2p SetConsoleOutputCP(1251); setlocale(LC_ALL, "Russian"); if (!i2p::win32::StartWin32App ()) return false; - + + // override log + i2p::config::SetOption("log", std::string ("file")); bool ret = Daemon_Singleton::start(); if (ret && IsLogToFile ()) { diff --git a/Makefile.mingw b/Makefile.mingw index ba741918..d752e48c 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -1,6 +1,6 @@ CXX = g++ WINDRES = windres -CXXFLAGS = -O2 -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN +CXXFLAGS = -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN NEEDED_CXXFLAGS = -std=c++11 BOOST_SUFFIX = -mt INCFLAGS = -I/usr/include/ -I/usr/local/include/