On Wed, 5 Jun 2002, Suriya Narayanan M S wrote:

> Hi all,
>       The following program writes 2 messages to
> syslog
> /********** Begin code ***********/
> #include <syslog.h>
> int main()
> {
>         openlog("Test of syslog",0,0);
>         syslog(LOG_EMERG,"Hello World\n");
>         syslog(LOG_EMERG,"Good Bye World\n");
>         closelog();
>         return 0;
> }
> /**********End code ***************/
> 
> If someone executes this program repeatedly
> of from a loop, syslog would become too large.
> Is something wrong?  Can access to syslog
> be restrcted?

perhaps you can build some sort of a test in your program so the program
doesn't "flood" the syslog. I've some messages in my syslog: "last 
message repeated n times". Maybe something like that is what you're
looking for?


HTH

--
Jos Lemmerling on Debian GNU/Linux                      jos(@)lemmerling(.net)



-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to