From 42d05dfcbe58f3e38fcaf68dafbf5f5464caa35d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 12 Feb 2009 23:57:49 +0100 Subject: [PATCH] Logging: Added a toy main() and plugged in the Makefile. --- ucw/Makefile | 4 ++-- ucw/logstream.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ucw/Makefile b/ucw/Makefile index 55b274a4..4e477b86 100644 --- a/ucw/Makefile +++ b/ucw/Makefile @@ -1,4 +1,4 @@ -# Makefile for the UCW Library (c) 1997--2008 Martin Mares +# Makefile for the UCW Library (c) 1997--2009 Martin Mares DIRS+=ucw LIBUCW=$(o)/ucw/libucw.pc @@ -12,7 +12,7 @@ LIBUCW_MODS= \ alloc alloc_str realloc bigalloc mempool mempool-str mempool-fmt eltpool \ mmap partmap hashfunc \ slists simple-lists bitsig \ - log log-file proctitle \ + log log-file logstream proctitle \ conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section \ ipaccess \ profile \ diff --git a/ucw/logstream.c b/ucw/logstream.c index 766faedb..d12688c0 100644 --- a/ucw/logstream.c +++ b/ucw/logstream.c @@ -516,3 +516,13 @@ struct log_stream *ls_syslog_new(int facility, const char *name) ls->close = ls_syslog_close; return ls; } + +#ifdef TEST + +int main(void) +{ + ls_msg(L_INFO, "Brum!"); + return 0; +} + +#endif -- 2.39.2