From owner-freebsd-questions Sat Jan 9 19:32:52 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA21496 for freebsd-questions-outgoing; Sat, 9 Jan 1999 19:32:52 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from shemp.palomine.net (shemp.palomine.net [205.198.88.200]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id TAA21485 for ; Sat, 9 Jan 1999 19:32:50 -0800 (PST) (envelope-from cjohnson@palomine.net) Received: (qmail 22290 invoked by uid 1000); 10 Jan 1999 03:32:17 -0000 Message-ID: <19990109223217.A22276@palomine.net> Date: Sat, 9 Jan 1999 22:32:17 -0500 From: Chris Johnson To: Stingray , questions@FreeBSD.ORG Subject: Re: syslog References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Stingray on Sat, Jan 09, 1999 at 09:01:59PM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 > #include > > 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