libqi-api
2.0.6.8
|
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 #ifndef _QI_LOG_HEADFILELOGHANDLER_HPP_ 00009 #define _QI_LOG_HEADFILELOGHANDLER_HPP_ 00010 00011 # include <boost/noncopyable.hpp> 00012 # include <qi/log.hpp> 00013 # include <string> 00014 00015 namespace qi { 00016 namespace log { 00017 class PrivateHeadFileLogHandler; 00018 00020 class QI_API HeadFileLogHandler : private boost::noncopyable 00021 { 00022 public: 00025 HeadFileLogHandler(const std::string &filePath, 00026 int length = 2000); 00028 virtual ~HeadFileLogHandler(); 00029 00032 void log(const qi::LogLevel verb, 00033 const qi::os::timeval date, 00034 const char *category, 00035 const char *msg, 00036 const char *file, 00037 const char *fct, 00038 const int line); 00039 00040 private: 00041 PrivateHeadFileLogHandler* _p; 00042 }; // !HeadFileLogHandler 00043 00044 }; // !log 00045 }; // !qi 00046 00047 #endif // _QI_LOG_HEADFILELOGHANDLER_HPP_