Fawkes API  Fawkes Development Version
access_log.h
1 
2 /***************************************************************************
3  * access_log.h - Web server access logger
4  *
5  * Created: Fr Feb 14 22:18:04 2014
6  * Copyright 2006-2014 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef __LIBS_WEBVIEW_ACCESS_LOG_H_
23 #define __LIBS_WEBVIEW_ACCESS_LOG_H_
24 
25 #include <cstdio>
26 
27 namespace fawkes {
28 #if 0 /* just to make Emacs auto-indent happy */
29 }
30 #endif
31 
32 class Mutex;
33 class WebRequest;
34 
36 {
37  public:
38  WebviewAccessLog(const char *filename);
40 
41  void log(const WebRequest *request);
42 
43  private:
44  Mutex *mutex_;
45  FILE *logfile_;
46 };
47 
48 }
49 
50 #endif
Fawkes library namespace.
~WebviewAccessLog()
Destructor.
Definition: access_log.cpp:59
WebviewAccessLog(const char *filename)
Constructor.
Definition: access_log.cpp:49
Webview access_log writer.
Definition: access_log.h:35
Web request meta data carrier.
Definition: request.h:42
Mutex mutual exclusion lock.
Definition: mutex.h:32
void log(const WebRequest *request)
Log a request.
Definition: access_log.cpp:70