--- l2_test.c 2001/11/06 15:02:49 1.41
+++ l2_test.c 2001/11/07 11:37:18 1.42
@@ -75,30 +75,30 @@
die("failed to configure formatter for %%S");
/* create noop channel */
- if ((l2_channel_create(&ch, env, &l2_handler_noop)) != L2_OK)
+ if ((l2_channel_create(&ch, env, "noop")) != L2_OK)
die("failed to create noop channel");
/* create prefix channel */
- if ((l2_channel_create(&chPrefix, env, &l2_handler_prefix)) != L2_OK)
+ if ((l2_channel_create(&chPrefix, env, "prefix")) != L2_OK)
die("failed to create prefix channel");
if (l2_channel_configure(chPrefix, "prefix,timezone",
"[%d-%m-%Y/%H:%M:%S] %L test[%P]: ", "local") != L2_OK)
die("failed to configure prefix channel");
/* create prefix channel */
- if ((l2_channel_create(&chFilter, env, &l2_handler_filter)) != L2_OK)
+ if ((l2_channel_create(&chFilter, env, "filter")) != L2_OK)
die("failed to create filter channel");
if (l2_channel_configure(chFilter, "regex,negate", "hecking", 0) != L2_OK)
die("failed to configure filter channel");
/* create buffer channel */
- if ((l2_channel_create(&chBuffer, env, &l2_handler_buffer)) != L2_OK)
+ if ((l2_channel_create(&chBuffer, env, "buffer")) != L2_OK)
die("failed to create buffer channel");
if (l2_channel_configure(chBuffer, "size", 800) != L2_OK)
die("failed to configure buffer channel");
/* create file channel */
- if ((l2_channel_create(&chFile, env, &l2_handler_file)) != L2_OK)
+ if ((l2_channel_create(&chFile, env, "file")) != L2_OK)
die("failed to create file channel");
if (l2_channel_configure(chFile, "path,append,perm", "l2_test.log", TRUE, 0644) != L2_OK)
die("failed to configure file channel");
@@ -106,7 +106,7 @@
die("failed to level of smtp channel");
/* create syslog channel */
- if ((l2_channel_create(&chSyslog, env, &l2_handler_syslog)) != L2_OK)
+ if ((l2_channel_create(&chSyslog, env, "syslog")) != L2_OK)
die("failed to create syslog channel");
if (l2_channel_configure(chSyslog, "ident,facility,target,remotehost,logpid",
"L2-Test", "user", "remote", "en1", 1) != L2_OK)
@@ -115,7 +115,7 @@
die("failed to level of syslog channel");
/* create smtp channel */
- if ((l2_channel_create(&chSmtp, env, &l2_handler_smtp)) != L2_OK)
+ if ((l2_channel_create(&chSmtp, env, "smtp")) != L2_OK)
die("failed to create smtp channel");
if (l2_channel_configure(chSmtp, "rcpt,host,port", "rse@engelschall.com", "en1", "25") != L2_OK)
die("failed to configure smtp channel");
|