Date: Sat, 9 Jan 1999 22:32:17 -0500 From: Chris Johnson <cjohnson@palomine.net> To: Stingray <chrisd@bsdbox.dynip.com>, questions@FreeBSD.ORG Subject: Re: syslog Message-ID: <19990109223217.A22276@palomine.net> In-Reply-To: <Pine.BSF.3.96.990109205500.8630A-100000@bsdbox.dynip.com>; from Stingray on Sat, Jan 09, 1999 at 09:01:59PM -0600 References: <Pine.BSF.3.96.990109205500.8630A-100000@bsdbox.dynip.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 09, 1999 at 09:01:59PM -0600, Stingray wrote: > This maybe somewhat off-topic, but here it goes anyway... > > I'm trying to write a simple program that uses syslog on my FreeBSD > computer , but I can't get it to work: > > #include <syslog.h> > #include <stdio.h> > > int main() > { > openlog("testing", LOG_NDELAY, LOG_DAEMON); > syslog(LOG_DEBUG, "test"); > closelog(); > > return 0; > } > > > > It compiles, but when its run, it does nothing. does anyone know what's > wrong with my program? Nothing! You just don't have syslogd configured to log DEBUG messages. Replace LOG_DEBUG in your program with LOG_WARN and it'll work. Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990109223217.A22276>