libqi-api  2.0.6.8
/home/opennao/work/master/sdk/libqi/qi/log/consoleloghandler.hpp
Go to the documentation of this file.
00001 #pragma once
00002 /*
00003  * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
00004  * Use of this source code is governed by a BSD-style license that can be
00005  * found in the COPYING file.
00006  */
00007 
00008 
00009 #ifndef _QI_LOG_CONSOLELOGHANDLER_HPP_
00010 #define _QI_LOG_CONSOLELOGHANDLER_HPP_
00011 
00012 # include <boost/noncopyable.hpp>
00013 # include <qi/log.hpp>
00014 
00015 namespace qi {
00016   namespace log {
00017 
00018     class PrivateConsoleLogHandler;
00019 
00021     class QI_API ConsoleLogHandler : private boost::noncopyable
00022     {
00023     public:
00026       ConsoleLogHandler();
00027 
00030       ~ConsoleLogHandler();
00031 
00033       void log(const qi::LogLevel verb,
00034                const qi::os::timeval   date,
00035                const char              *category,
00036                const char              *msg,
00037                const char              *file,
00038                const char              *fct,
00039                const int               line);
00040 
00041       void updateColor();
00042 
00043 
00044     protected:
00045       PrivateConsoleLogHandler* _p;
00046     };
00047   }
00048 }
00049 
00050 
00051 #endif  // _QI_LOG_CONSOLELOGHANDLER_HPP_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines