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
27namespace fawkes {
28
29class Mutex;
30class WebRequest;
31
33{
34public:
35 WebviewAccessLog(const char *filename);
37
38 void log(const WebRequest *request);
39
40private:
41 Mutex *mutex_;
42 FILE * logfile_;
43};
44
45} // namespace fawkes
46
47#endif
Mutex mutual exclusion lock.
Definition: mutex.h:33
Web request meta data carrier.
Definition: request.h:42
Webview access_log writer.
Definition: access_log.h:33
void log(const WebRequest *request)
Log a request.
Definition: access_log.cpp:65
WebviewAccessLog(const char *filename)
Constructor.
Definition: access_log.cpp:45
~WebviewAccessLog()
Destructor.
Definition: access_log.cpp:55
Fawkes library namespace.