OSDN Git Service

3efbb627e10c259580926c0f025c76a67a57767e
[ultramonkey-l7/ultramonkey-l7-v3.git] / l7vsd / unit_tests / session_test / logger_stb / logger_implement_access.h
1 #ifndef LOGGER_IMPL_ACCESS_H
2 #define LOGGER_IMPL_ACCESS_H
3
4 //#include <sstream>
5 //#include <map>
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"
16
17 #define LOGGER_ACCESS_PROCESS_ID "ACCESS"
18
19
20 #define LOGGER_NULL "/dev/null"
21
22 #define LOGGER_LEVEL_NUM (6)
23
24 #define LOG_CAT_L7VSD_ACCESS_LOGGER "l7vsd_access_logger"
25
26 //namespace log4cxx
27 //{
28 //      typedef helpers::ObjectPtrT<RollingFileAppender> RollingFileAppenderPtr;
29 //}
30
31 namespace l7vs{
32
33 class logger_implement_access {
34 public:
35     
36 //    typedef std::map< std::string , std::string > accesslog_rotate_map_type;
37
38     logger_implement_access(const std::string &aclogFilename);
39     virtual ~logger_implement_access(){};
40
41         //! initialze function
42 //      virtual bool init(appender_property& access_log_default_property,const std::map<std::string,std::string>& rotate);
43
44     /*!
45          * output info log.
46          *
47          * @param   category that logging matter occured
48          * @param   log message id
49          * @param   log message
50          * @param   current file
51          * @param   current line
52          * @retrun  void
53          */
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;
64             putLog_msg = msg;
65         };
66
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;
72
73 //    void      addRef();
74
75 //    void      releaseRef();
76
77 //    bool      operator<=(const int access_num );
78
79 //    std::string getAcLogFileName(){ return( this->acLogFileName ); }
80
81 //    bool checkRotateParameterComp(accesslog_rotate_map_type &rotatedata);
82     
83 //    bool is_rotate_default_flag();
84     
85 protected:
86
87     
88 //    int access_cnt;
89
90 //    std::string acLogFileName;
91
92         //! initialized flag
93 //      bool initialized;
94   
95         //! hostname
96 //    appender_property access_log_property;
97
98 //    accesslog_rotate_map_type aclog_args;
99     
100 //    bool rotate_default_flag;
101     
102 //    bool setAcLoggerConf(appender_property& access_log_default_property,const accesslog_rotate_map_type& rotate);
103
104 };
105
106 };
107
108 #endif //       LOGGER_IMPL_ACCESS_H