src/server/daemon/log.h

changeset 415
d938228c382e
parent 256
19259b6c5cf7
child 434
ff576305ae6e
equal deleted inserted replaced
414:99a34860c105 415:d938228c382e
28 28
29 #ifndef LOG_H 29 #ifndef LOG_H
30 #define LOG_H 30 #define LOG_H
31 31
32 #include "../public/nsapi.h" 32 #include "../public/nsapi.h"
33 #include <ucx/string.h> 33 #include <cx/string.h>
34 #include <ucx/utils.h> 34 #include <cx/utils.h>
35 35
36 #include <inttypes.h> 36 #include <inttypes.h>
37 37
38 #ifdef __cplusplus 38 #ifdef __cplusplus
39 extern "C" { 39 extern "C" {
50 FILE *file; 50 FILE *file;
51 uint32_t ref; 51 uint32_t ref;
52 } LogFile; 52 } LogFile;
53 53
54 typedef struct { 54 typedef struct {
55 sstr_t file; 55 cxmutstr file;
56 sstr_t format; // unused 56 cxmutstr format; // unused
57 LogFile *log; 57 LogFile *log;
58 } AccessLog; 58 } AccessLog;
59 59
60 typedef void (*log_writefunc)(void *cookie, char *msg, size_t length); 60 typedef void (*log_writefunc)(void *cookie, char *msg, size_t length);
61 typedef struct { 61 typedef struct {
67 67
68 void log_uninitialized_writeln(char *str, size_t len); 68 void log_uninitialized_writeln(char *str, size_t len);
69 69
70 void log_file_writeln(char *str, size_t len); 70 void log_file_writeln(char *str, size_t len);
71 71
72 sstr_t log_get_prefix(int level); 72 cxmutstr log_get_prefix(int level);
73 73
74 void log_add_logdup(LogDup *dup); 74 void log_add_logdup(LogDup *dup);
75 void log_remove_logdup(LogDup *dup); 75 void log_remove_logdup(LogDup *dup);
76 76
77 // access logging 77 // access logging
78 LogFile* get_access_log_file(scstr_t file); 78 LogFile* get_access_log_file(cxstring file);
79 79
80 #ifdef __cplusplus 80 #ifdef __cplusplus
81 } 81 }
82 #endif 82 #endif
83 83

mercurial