source: trunk/oscam-log.h@ 8324

Last change on this file since 8324 was 8324, checked in by gf, 9 years ago

config: Delete config-funcs.h.

Replace the functionality with config_enabled() magic macro borrowed
from Linux.

File size: 1.1 KB
Line 
1#ifndef OSCAM_LOG_H_
2#define OSCAM_LOG_H_
3
4int32_t cs_init_log(void);
5int32_t cs_open_logfiles(void);
6void cs_close_log(void);
7
8void cs_disable_log(int8_t disabled);
9
10void cs_reinit_loghist(uint32_t size);
11
12void 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_enabled(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_enabled(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_enabled(WITH_DEBUG) && ((mask) & cs_dblevel)) cs_log_int(mask, 1, buf , n, ##__VA_ARGS__); } while(0)
21
22void logCWtoFile(ECM_REQUEST *er, uchar *cw);
23
24int32_t cs_init_statistics(void);
25void cs_statistics(struct s_client * client);
26
27#endif
Note: See TracBrowser for help on using the repository browser.