--- l2_test.c 2001/11/03 20:49:25 1.36
+++ l2_test.c 2001/11/03 22:51:36 1.37
@@ -57,7 +57,6 @@
int main(int argc, char *argv[])
{
- int i; /* For testing l2_stream_log() */
l2_channel_t *chFilt;
l2_channel_t *chPrefix;
l2_channel_t *chBuf;
@@ -100,7 +99,7 @@
if ((chBuf = l2_channel_create(&l2_handler_buffer)) == NULL) /* Buffer */
die("failed to create buffer channel");
- if (l2_channel_configure(chBuf, "size,interval", 800, 12) != L2_OK)
+ if (l2_channel_configure(chBuf, "size", 800) != L2_OK)
die("failed to configure buffer channel");
if ((chFile = l2_channel_create(&l2_handler_file)) == NULL) /* File */
@@ -221,20 +220,17 @@
if (l2_stream_formatter(st, 'S', l2_util_fmt_dump, NULL) != L2_OK)
die("failed to configure formatter for %%S");
- while (1) {
- for (i = 1; i != 0; i++);
- if (l2_stream_log(st, L2_LEVEL_PANIC, "0Checking localhost %s %{myparm}k <%{text}S><%{hex}S><%{base64}S>\n", "foo", 12345, "foo\1bar", 7, "foo\1bar", 7, "foo\1bar", 7) != L2_OK)
- die("failed to log message to stream");
-
- if (l2_stream_log(st, L2_LEVEL_PANIC, "1Shecking\n") != L2_OK)
- die("failed to log message to stream");
-
- if (l2_stream_log(st, L2_LEVEL_PANIC, "2Checking localhost %s %{myparm}k <%{text}S><%{hex}S><%{base64}S>\n", "foo", 12345, "foo\1bar", 7, "foo\1bar", 7, "foo\1bar", 7) != L2_OK)
- die("failed to log message to stream");
-
- if (l2_stream_log(st, L2_LEVEL_PANIC, "3Shecking\n") != L2_OK)
- die("failed to log message to stream");
- }
+ if (l2_stream_log(st, L2_LEVEL_PANIC, "0Checking localhost %s %{myparm}k <%{text}S><%{hex}S><%{base64}S>\n", "foo", 12345, "foo\1bar", 7, "foo\1bar", 7, "foo\1bar", 7) != L2_OK)
+ die("failed to log message to stream");
+
+ if (l2_stream_log(st, L2_LEVEL_PANIC, "1Shecking\n") != L2_OK)
+ die("failed to log message to stream");
+
+ if (l2_stream_log(st, L2_LEVEL_PANIC, "2Checking localhost %s %{myparm}k <%{text}S><%{hex}S><%{base64}S>\n", "foo", 12345, "foo\1bar", 7, "foo\1bar", 7, "foo\1bar", 7) != L2_OK)
+ die("failed to log message to stream");
+
+ if (l2_stream_log(st, L2_LEVEL_PANIC, "3Shecking\n") != L2_OK)
+ die("failed to log message to stream");
if (l2_stream_destroy(st) != L2_OK)
die("failed to destroy stream");
|