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

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

Major update: using Boost.Log if PACPUS_USE_LOG is true.
Added: overloaded operator<< for QString (explicit instantiation).

  • Property svn:executable set to *
File size: 1.2 KB
Line 
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
11#include <ostream>
12#include <QString>
13
14template< typename CharT, typename TraitsT >
15std::basic_ostream< CharT, TraitsT >& operator<< (std::basic_ostream< CharT, TraitsT >& strm, QString const& s)
16{
17 strm << s.toStdString();
18 return strm;
19}
20
21// explicit instantiation
22template
23PACPUSLIB_API std::basic_ostream<char>& operator<< (std::basic_ostream<char>& strm, QString const& s);
24
25#endif // PACPUS_USE_LOG
26
27namespace pacpus {
28
29#if defined(PACPUS_USE_LOG)
30
31//#include <boost/log/utility/setup/formatter_parser.hpp>
32
33//void init_log_factories()
34//{
35// //boost::log::register_simple_formatter_factory< QString, char >("QString");
36//}
37
38#endif // PACPUS_USE_LOG
39
40LogConfigurator::LogConfigurator()
41{
42#if defined(PACPUS_USE_LOG)
43 //init_log_factories();
44#endif // PACPUS_USE_LOG
45}
46
47void LogConfigurator::configureLoggerWithFile(const char * /*configFilename*/)
48{
49}
50
51} // namespace pacpus
Note: See TracBrowser for help on using the repository browser.