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
|
Rev | Line | |
---|
[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] | 14 | template< typename CharT, typename TraitsT >
|
---|
| 15 | std::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
|
---|
| 22 | template
|
---|
| 23 | PACPUSLIB_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] | 27 | namespace pacpus {
|
---|
| 28 |
|
---|
| 29 | #if defined(PACPUS_USE_LOG)
|
---|
[89] | 30 |
|
---|
[141] | 31 | //#include <boost/log/utility/setup/formatter_parser.hpp>
|
---|
[89] | 32 |
|
---|
[141] | 33 | //void 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 |
|
---|
| 40 | LogConfigurator::LogConfigurator()
|
---|
| 41 | {
|
---|
[141] | 42 | #if defined(PACPUS_USE_LOG)
|
---|
| 43 | //init_log_factories();
|
---|
| 44 | #endif // PACPUS_USE_LOG
|
---|
[89] | 45 | }
|
---|
| 46 |
|
---|
| 47 | void LogConfigurator::configureLoggerWithFile(const char * /*configFilename*/)
|
---|
| 48 | {
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | } // namespace pacpus
|
---|
Note:
See
TracBrowser
for help on using the repository browser.