source: trunk/oscam-log.h@ 8448

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

log: Free log history on exit.

Make valgrind a little bit happier.

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_disable_log(int8_t disabled);
7
8void cs_reinit_loghist(uint32_t size);
9
10void cs_log_int(uint16_t mask, int8_t lock, const uchar *buf, int32_t n, const char *fmt, ...) __attribute__ ((format (printf, 5, 6)));
11
12#define cs_log(...) cs_log_int(0, 1, NULL, 0, ##__VA_ARGS__)
13#define cs_log_nolock(...) cs_log_int(0, 0, NULL, 0, ##__VA_ARGS__)
14#define cs_dump(buf, n, ...) cs_log_int(0, 1, buf, n, ##__VA_ARGS__)
15
16#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)
17#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)
18#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)
19
20void logCWtoFile(ECM_REQUEST *er, uchar *cw);
21
22int32_t cs_init_statistics(void);
23void cs_statistics(struct s_client * client);
24
25void log_free(void);
26
27#endif
Note: See TracBrowser for help on using the repository browser.