--- l2.h.in 2001/11/06 15:02:49 1.18
+++ l2.h.in 2001/11/07 11:37:18 1.19
@@ -169,6 +169,7 @@
/* channel handler specification structure */
struct l2_handler_st {
+ const char *name;
l2_chtype_t type;
l2_result_t (*create) (l2_context_t *ctx, l2_channel_t *ch);
l2_result_t (*configure)(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap);
@@ -190,7 +191,7 @@
va_list *ap /* in/out arg: variable argument pointer */
);
-/* list of shipped (output) channel handlers */
+/* list of shipped (output) channel handlers (pre-configured in l2_env_t objects) */
extern l2_handler_t l2_handler_null;
extern l2_handler_t l2_handler_fd;
extern l2_handler_t l2_handler_file;
@@ -199,7 +200,7 @@
extern l2_handler_t l2_handler_syslog;
extern l2_handler_t l2_handler_smtp;
-/* list of shipped (filter) channel handlers */
+/* list of shipped (filter) channel handlers (pre-configured in l2_env_t objects) */
extern l2_handler_t l2_handler_noop;
extern l2_handler_t l2_handler_filter;
extern l2_handler_t l2_handler_prefix;
@@ -210,11 +211,12 @@
l2_result_t l2_env_destroy (l2_env_t *env);
l2_result_t l2_env_levels (l2_env_t *env, unsigned int levelmask, unsigned int flushmask);
l2_result_t l2_env_formatter (l2_env_t *env, char id, l2_formatter_t cb, l2_context_t *ctx);
+l2_result_t l2_env_handler (l2_env_t *env, l2_handler_t *h);
l2_result_t l2_env_errorinfo (l2_env_t *env, l2_result_t rv, const char *fmt, ...);
char *l2_env_strerror (l2_env_t *env, l2_result_t rv);
/* channel operations */
-l2_result_t l2_channel_create (l2_channel_t **ch, l2_env_t *env, l2_handler_t *h);
+l2_result_t l2_channel_create (l2_channel_t **ch, l2_env_t *env, const char *name);
l2_result_t l2_channel_destroy (l2_channel_t *ch);
l2_result_t l2_channel_levels (l2_channel_t *ch, unsigned int levelmask, unsigned int flushmask);
l2_result_t l2_channel_configure (l2_channel_t *ch, const char *fmt, ...);
|