diff --git a/src/cpp/Gradido_LoginServer.cpp b/src/cpp/Gradido_LoginServer.cpp index aec67f8d6..9ad444b4a 100644 --- a/src/cpp/Gradido_LoginServer.cpp +++ b/src/cpp/Gradido_LoginServer.cpp @@ -17,6 +17,7 @@ #include "Poco/AsyncChannel.h" #include "Poco/SimpleFileChannel.h" #include "Poco/ConsoleChannel.h" +#include "Poco/SplitterChannel.h" #include "MySQL/Poco/Connector.h" @@ -138,7 +139,13 @@ int Gradido_LoginServer::main(const std::vector& args) // logging for request handling Poco::AutoPtr requestLogConsoleChannel(new Poco::ConsoleChannel); - Poco::AutoPtr requestLogAsyncChannel(new Poco::AsyncChannel(requestLogConsoleChannel)); + Poco::AutoPtr requestLogFileChannel(new Poco::SimpleFileChannel("requestLog.txt")); + Poco::AutoPtr requestLogSplitter(new Poco::SplitterChannel); + requestLogSplitter->addChannel(requestLogConsoleChannel); + requestLogSplitter->addChannel(requestLogFileChannel); + + Poco::AutoPtr requestLogAsyncChannel(new Poco::AsyncChannel(requestLogSplitter)); + Poco::Logger& requestLog = Poco::Logger::get("requestLog"); requestLog.setChannel(requestLogAsyncChannel); requestLog.setLevel("information");