1 #ifndef LOGGER_IMPL_ACCESS_H
2 #define LOGGER_IMPL_ACCESS_H
6 //#include <log4cxx/logger.h>
7 //#include <log4cxx/level.h>
8 //#include <log4cxx/net/syslogappender.h>
9 //#include <log4cxx/fileappender.h>
10 //#include <log4cxx/rollingfileappender.h>
11 //#include <log4cxx/patternlayout.h>
12 #include <boost/format.hpp>
13 //#include <boost/tr1/unordered_map.hpp>
14 //#include <boost/foreach.hpp>
15 //#include "appender_property.h"
17 #define LOGGER_ACCESS_PROCESS_ID "ACCESS"
20 #define LOGGER_NULL "/dev/null"
22 #define LOGGER_LEVEL_NUM (6)
24 #define LOG_CAT_L7VSD_ACCESS_LOGGER "l7vsd_access_logger"
28 // typedef helpers::ObjectPtrT<RollingFileAppender> RollingFileAppenderPtr;
33 class logger_implement_access {
36 // typedef std::map< std::string , std::string > accesslog_rotate_map_type;
38 logger_implement_access(const std::string &aclogFilename);
39 virtual ~logger_implement_access(){};
41 //! initialze function
42 // virtual bool init(appender_property& access_log_default_property,const std::map<std::string,std::string>& rotate);
47 * @param category that logging matter occured
48 * @param log message id
54 virtual inline void putLog(
55 const std::string& vsinfo,
56 const std::string& cl_con_org,
57 const std::string& rs_con_org,
58 const std::string& rs_con_dest,
59 const std::string& msg){
60 putLog_vsinfo = vsinfo;
61 putLog_cl_con_org = cl_con_org;
62 putLog_rs_con_org = rs_con_org;
63 putLog_rs_con_dest =rs_con_dest;
67 std::string putLog_vsinfo;
68 std::string putLog_cl_con_org;
69 std::string putLog_rs_con_org;
70 std::string putLog_rs_con_dest;
71 std::string putLog_msg;
77 // bool operator<=(const int access_num );
79 // std::string getAcLogFileName(){ return( this->acLogFileName ); }
81 // bool checkRotateParameterComp(accesslog_rotate_map_type &rotatedata);
83 // bool is_rotate_default_flag();
90 // std::string acLogFileName;
96 // appender_property access_log_property;
98 // accesslog_rotate_map_type aclog_args;
100 // bool rotate_default_flag;
102 // bool setAcLoggerConf(appender_property& access_log_default_property,const accesslog_rotate_map_type& rotate);
108 #endif // LOGGER_IMPL_ACCESS_H