summaryrefslogtreecommitdiff
path: root/src/logd.h
blob: b91efe09a0a4bb08df394e5ac8ec9b849ff4779d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "incl.h"

#ifndef LOGD_H
#define LOGD_H

#include <queue>
#include <time.h>

class logd
{

private:
    string s_logfile;
    queue<string> s_queue;
    pthread_mutex_t mut_s_logging;
    int i_lines;

    void initialize( string s_filename, int i_log_lines );
    void flush();
    void set_lines( const int i_lines );
    string get_time_string();

public:
    logd( string s_filename, string s_log_lines );
    logd( string s_filename, int i_log_lines );
    ~logd();

    void set_logfile( string s_path, string s_filename );
    void log_access( map_string request );
    void log_simple_line( string s_line );
    void flush_logs();
    static string remove_html_tags( string s_log );
};


#endif