source: pacpusframework/branches/2.0-beta1/src/PacpusLib/Log.cpp@ 142

Last change on this file since 142 was 142, checked in by Marek Kurdej, 11 years ago

Update: minor uncommented.
Info: cannot use boost::log::register_simple_formatter_factory, due to compiler incompatibility (and cannot disable compiler extensions /Za).

  • Property svn:executable set to *
File size: 1.2 KB
RevLine 
[89]1// %pacpus:license{
2// This file is part of the PACPUS framework distributed under the
3// CECILL-C License, Version 1.0.
4// %pacpus:license}
5/// @version $Id: Log.cpp 76 2013-01-10 17:05:10Z kurdejma $
6
7#include <Pacpus/kernel/Log.h>
8
9#ifdef PACPUS_USE_LOG
10
[141]11#include <ostream>
[89]12#include <QString>
13
[141]14template< typename CharT, typename TraitsT >
15std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, QString const& s)
[89]16{
[141]17 strm << s.toStdString();
18 return strm;
[89]19}
20
[141]21// explicit instantiation
22template
23PACPUSLIB_API std::basic_ostream<char>& operator<< (std::basic_ostream<char>& strm, QString const& s);
[89]24
[141]25#endif // PACPUS_USE_LOG
[89]26
[141]27namespace pacpus {
28
29#if defined(PACPUS_USE_LOG)
[89]30
[141]31//#include <boost/log/utility/setup/formatter_parser.hpp>
[89]32
[142]33void init_log_factories()
34{
35 //boost::log::register_simple_formatter_factory< QString, char >("QString");
36}
[89]37
[141]38#endif // PACPUS_USE_LOG
[89]39
40LogConfigurator::LogConfigurator()
41{
[141]42#if defined(PACPUS_USE_LOG)
[142]43 init_log_factories();
[141]44#endif // PACPUS_USE_LOG
[89]45}
46
47void LogConfigurator::configureLoggerWithFile(const char * /*configFilename*/)
48{
49}
50
51} // namespace pacpus
Note: See TracBrowser for help on using the repository browser.