From: Martin Mares Date: Thu, 12 Feb 2009 22:57:49 +0000 (+0100) Subject: Logging: Added a toy main() and plugged in the Makefile. X-Git-Tag: holmes-import~106 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=42d05dfcbe58f3e38fcaf68dafbf5f5464caa35d;p=libucw.git Logging: Added a toy main() and plugged in the Makefile. --- 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