1 | #ifndef OSCAM_LOG_H_
|
---|
2 | #define OSCAM_LOG_H_
|
---|
3 |
|
---|
4 | int32_t cs_init_log(void);
|
---|
5 | int32_t cs_open_logfiles(void);
|
---|
6 | void cs_close_log(void);
|
---|
7 |
|
---|
8 | void cs_disable_log(int8_t disabled);
|
---|
9 |
|
---|
10 | void cs_reinit_loghist(uint32_t size);
|
---|
11 |
|
---|
12 | void cs_log_int(uint16_t mask, int8_t lock, const uchar *buf, int32_t n, const char *fmt, ...) __attribute__ ((format (printf, 5, 6)));
|
---|
13 |
|
---|
14 | #define cs_log(...) cs_log_int(0, 1, NULL, 0, ##__VA_ARGS__)
|
---|
15 | #define cs_log_nolock(...) cs_log_int(0, 0, NULL, 0, ##__VA_ARGS__)
|
---|
16 | #define cs_dump(buf, n, ...) cs_log_int(0, 1, buf, n, ##__VA_ARGS__)
|
---|
17 |
|
---|
18 | #define cs_debug_mask(mask, ...) do { if (config_WITH_DEBUG() && ((mask) & cs_dblevel)) cs_log_int(mask, 1, NULL, 0, ##__VA_ARGS__); } while(0)
|
---|
19 | #define cs_debug_mask_nolock(mask, ...) do { if (config_WITH_DEBUG() && ((mask) & cs_dblevel)) cs_log_int(mask, 0, NULL, 0, ##__VA_ARGS__); } while(0)
|
---|
20 | #define cs_ddump_mask(mask, buf, n, ...) do { if (config_WITH_DEBUG() && ((mask) & cs_dblevel)) cs_log_int(mask, 1, buf , n, ##__VA_ARGS__); } while(0)
|
---|
21 |
|
---|
22 | void logCWtoFile(ECM_REQUEST *er, uchar *cw);
|
---|
23 |
|
---|
24 | int32_t cs_init_statistics(void);
|
---|
25 | void cs_statistics(struct s_client * client);
|
---|
26 |
|
---|
27 | #endif
|
---|