* Major rewrite of event streams
* If you used old event callbacks API, you need to switch to the streams API
* See clixon_stream.[ch]
* Old streams API which needs to be removed include:
* clicon_log_register_callback()
* subscription_add() --> stream_register()
* backend_notify() and backend_notify_xml() - use stream_notify() instead
* Example uses "NETCONF" stream instead of "ROUTING"
* Added timeout option -t for clixon_netconf - quit after max time.
This commit is contained in:
parent
d7fbe75c9e
commit
98f3cd0e32
31 changed files with 597 additions and 635 deletions
|
|
@ -46,11 +46,6 @@
|
|||
#define CLICON_LOG_STDOUT 4 /* print logs on stdout */
|
||||
#define CLICON_LOG_FILE 8 /* print logs on clicon_log_filename */
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
typedef int (clicon_log_notify_t)(int level, char *msg, void *arg);
|
||||
|
||||
/*
|
||||
* Variables
|
||||
*/
|
||||
|
|
@ -64,7 +59,6 @@ int clicon_log_exit(void);
|
|||
int clicon_log_opt(char c);
|
||||
int clicon_log_file(char *filename);
|
||||
int clicon_get_logflags(void);
|
||||
int clicon_log_str(int level, char *msg);
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
int clicon_log(int level, char *format, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
int clicon_debug(int dbglevel, char *format, ...) __attribute__ ((format (printf, 2, 3)));
|
||||
|
|
@ -72,9 +66,7 @@ int clicon_debug(int dbglevel, char *format, ...) __attribute__ ((format (printf
|
|||
int clicon_log(int level, char *format, ...);
|
||||
int clicon_debug(int dbglevel, char *format, ...);
|
||||
#endif
|
||||
clicon_log_notify_t *clicon_log_register_callback(clicon_log_notify_t *cb, void *arg);
|
||||
int clicon_debug_init(int dbglevel, FILE *f);
|
||||
|
||||
char *mon2name(int md);
|
||||
|
||||
#endif /* _CLIXON_LOG_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue