Skip to content
Snippets Groups Projects
Commit 5f410821 authored by Savici, Andrei T.'s avatar Savici, Andrei T.
Browse files

Log channel for std::cout. Refs #6933

parent b844c094
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,7 @@ set ( SRC_FILES ...@@ -69,6 +69,7 @@ set ( SRC_FILES
src/SobolSequence.cpp src/SobolSequence.cpp
src/StartsWithValidator.cpp src/StartsWithValidator.cpp
src/Statistics.cpp src/Statistics.cpp
src/StdChannel.cpp
src/Strings.cpp src/Strings.cpp
src/TestChannel.cpp src/TestChannel.cpp
src/ThreadPool.cpp src/ThreadPool.cpp
...@@ -194,6 +195,7 @@ set ( INC_FILES ...@@ -194,6 +195,7 @@ set ( INC_FILES
inc/MantidKernel/SobolSequence.h inc/MantidKernel/SobolSequence.h
inc/MantidKernel/StartsWithValidator.h inc/MantidKernel/StartsWithValidator.h
inc/MantidKernel/Statistics.h inc/MantidKernel/Statistics.h
inc/MantidKernel/StdChannel.h
inc/MantidKernel/Strings.h inc/MantidKernel/Strings.h
inc/MantidKernel/System.h inc/MantidKernel/System.h
inc/MantidKernel/Task.h inc/MantidKernel/Task.h
......
#ifndef STDCHANNEL_H
#define STDCHANNEL_H
#include <MantidKernel/DllConfig.h>
#include <Poco/ConsoleChannel.h>
namespace Poco{
class MANTID_KERNEL_DLL StdChannel : public ConsoleChannel
{
public:
/// Constructor for StdChannel
StdChannel();
/// destructor
~StdChannel();
};
}
#endif // STDCHANNEL_H
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "MantidKernel/Strings.h" #include "MantidKernel/Strings.h"
#include "MantidKernel/Logger.h" #include "MantidKernel/Logger.h"
#include "MantidKernel/FilterChannel.h" #include "MantidKernel/FilterChannel.h"
#include "MantidKernel/StdChannel.h"
#include "MantidKernel/Exception.h" #include "MantidKernel/Exception.h"
#include "MantidKernel/FacilityInfo.h" #include "MantidKernel/FacilityInfo.h"
...@@ -182,6 +183,9 @@ ConfigServiceImpl::ConfigServiceImpl() : ...@@ -182,6 +183,9 @@ ConfigServiceImpl::ConfigServiceImpl() :
//Register the FilterChannel with the Poco logging factory //Register the FilterChannel with the Poco logging factory
Poco::LoggingFactory::defaultFactory().registerChannelClass("FilterChannel", new Poco::Instantiator< Poco::LoggingFactory::defaultFactory().registerChannelClass("FilterChannel", new Poco::Instantiator<
Poco::FilterChannel, Poco::Channel>); Poco::FilterChannel, Poco::Channel>);
//Register StdChannel with Poco
Poco::LoggingFactory::defaultFactory().registerChannelClass("StdChannel", new Poco::Instantiator<
Poco::StdChannel, Poco::Channel>);
// Define the directory to search for the Mantid.properties file. // Define the directory to search for the Mantid.properties file.
Poco::File f; Poco::File f;
......
#include <MantidKernel/StdChannel.h>
#include <iostream>
namespace Poco {
StdChannel::StdChannel():ConsoleChannel(std::cout)
{
}
StdChannel::~StdChannel()
{
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment