mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-15 09:23:43 +02:00
our current experimental Neutrino branch
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@27 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
43
src/nhttpd/yhttpd_mods/mod_weblog.h
Normal file
43
src/nhttpd/yhttpd_mods/mod_weblog.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//=============================================================================
|
||||
// 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.2 $");}
|
||||
virtual THandleStatus Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList);
|
||||
};
|
||||
#endif // __yhttpd_mod_weblog_h__
|
||||
|
Reference in New Issue
Block a user