#define DEBUGPC(ss, fmt, args...)
#endif
-#define static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1];
void logp(unsigned int subsys, char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 5, 6)));
union {
struct {
FILE *out;
- } tgt_stdout;
+ const char *fname;
+ } tgt_file;
struct {
int priority;
} tgt_vty;
};
- void (*output) (struct log_target *target, const char *string);
+ void (*output) (struct log_target *target, unsigned int level,
+ const char *string);
};
/* use the above macros */
/* management of the targets */
struct log_target *log_target_create(void);
+void log_target_destroy(struct log_target *target);
struct log_target *log_target_create_stderr(void);
+struct log_target *log_target_create_file(const char *fname);
+struct log_target *log_target_create_syslog(const char *ident, int option,
+ int facility);
+int log_target_file_reopen(struct log_target *tgt);
+
void log_add_target(struct log_target *target);
void log_del_target(struct log_target *target);