libqi  1.14.5
qi/log/headfileloghandler.hpp
00001 /*
00002  * Copyright (c) 2012 Aldebaran Robotics. All rights reserved.
00003  * Use of this source code is governed by a BSD-style license that can be
00004  * found in the COPYING file.
00005  */
00006 
00007 #pragma once
00008 #ifndef _LIBQI_QI_LOG_HEADFILELOGHANDLER_HPP_
00009 #define _LIBQI_QI_LOG_HEADFILELOGHANDLER_HPP_
00010 
00011 # include <qi/log.hpp>
00012 # include <string>
00013 
00014 namespace qi {
00015   namespace log {
00016     class PrivateHeadFileLogHandler;
00017 
00022     class QI_API HeadFileLogHandler
00023     {
00024     public:
00025       HeadFileLogHandler(const std::string &filePath,
00026                          int length = 2000);
00027       virtual ~HeadFileLogHandler();
00028 
00029       void log(const qi::log::LogLevel verb,
00030                const qi::os::timeval   date,
00031                const char              *category,
00032                const char              *msg,
00033                const char              *file,
00034                const char              *fct,
00035                const int               line);
00036 
00037     private:
00038       QI_DISALLOW_COPY_AND_ASSIGN(HeadFileLogHandler);
00039       PrivateHeadFileLogHandler* _private;
00040     }; // !HeadFileLogHandler
00041 
00042   }; // !log
00043 }; // !qi
00044 
00045 #endif  // _LIBQI_QI_LOG_HEADFILELOGHANDLER_HPP_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines