mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-14 17:03:40 +02:00
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@406 e54a6e83-5905-42d5-8d5c-058d10e6a962
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
//=============================================================================
|
|
// YHTTPD
|
|
// mod_weblog : Logging of HTTPD-Requests/Responses
|
|
//=============================================================================
|
|
#ifndef __yhttpd_mod_weblog_h__
|
|
#define __yhttpd_mod_weblog_h__
|
|
|
|
#include "yconfig.h"
|
|
#include "yhook.h"
|
|
//-----------------------------------------------------------------------------
|
|
// Defaults
|
|
#ifndef LOG_FILE
|
|
#define LOG_FILE "/tmp/yhttpd.log"
|
|
#define LOG_FORMAT "off"
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
class CmWebLog : public Cyhook
|
|
{
|
|
static pthread_mutex_t WebLog_mutex;
|
|
static FILE *WebLogFile;
|
|
static std::string WebLogFilename;
|
|
static int RefCounter; // Count Instances
|
|
static std::string LogFormat;
|
|
|
|
public:
|
|
CmWebLog();
|
|
~CmWebLog();
|
|
|
|
bool OpenLogFile();
|
|
void CloseLogFile();
|
|
void AddLogEntry_CLF(CyhookHandler *hh);
|
|
void AddLogEntry_ELF(CyhookHandler *hh);
|
|
bool printf(const char *fmt, ...);
|
|
|
|
// Hooks
|
|
virtual THandleStatus Hook_EndConnection(CyhookHandler *hh);
|
|
virtual std::string getHookName(void) {return std::string("mod_weblog");}
|
|
virtual std::string getHookVersion(void) {return std::string("$Revision: 1.3 $");}
|
|
virtual THandleStatus Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList);
|
|
};
|
|
#endif // __yhttpd_mod_weblog_h__
|
|
|