delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/19/09:36:45

X-Spam-Check-By: sourceware.org
Date: Thu, 19 Jan 2006 09:35:47 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Herman Poon <poonh AT mcmaster DOT ca>
cc: cygwin AT cygwin DOT com
Subject: Re: cron - Application Event Log
In-Reply-To: <web-115219776@cgpsrv2.cis.mcmaster.ca>
Message-ID: <Pine.GSO.4.63.0601190928040.20867@access1.cims.nyu.edu>
References: <web-115219776 AT cgpsrv2 DOT cis DOT mcmaster DOT ca>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Ugh, top-posting...  Reformatted.

On Thu, 19 Jan 2006, Herman Poon wrote:

> On Wed, 18 Jan 2006 16:59:53 -0500 (EST) Igor Peshansky <pechtcha AT XX DOT XXX DOT XXX> wrote:

Thanks.  It's usually easier to simply delete the address -- I 'X'd it out
to indicate that it was not masked before...

> > On Wed, 18 Jan 2006, Herman Poon wrote:
> >
> > > I would like to suppress logging of tasks by cron in the Windows
> > > Application Event log. I want to schedule a task that runs
> > > frequently but do not want the Event log to quickly grow.
> > >
> > > I did search the Cygwin mailing list archive and found this:
> > > http://sourceware.org/ml/cygwin/2004-10/msg01333.html
> > >
> > > I found that the -1 and -2 switches create String values "StdOut"
> > > and "StdErr" for the Parameters key of the cron service in the
> > > registry. It would appear that any output should be logged to
> > > /var/log/cron.log.
> > >
> > > Unfortunately, this does not seem to work and every time a task runs
> > > in cron, an entry is added to the Application Event log. The
> > > cron.log file itself only shows lines similar to the following:
> > > [2252] cron started
> > >
> > > The cron.log file doesn't contain anything else, just the pid and
> > > the "started" line (when cron is stopped it doesn't log anything to
> > > cron.log). I did stop/restart cron just to see if the settings would
> > > take effect, but this didn't work either.
> > >
> > > I'm hoping that somebody has some suggestions for me. Thank you,
> >
> > Cron uses the syslog interface to log its events.  By default, syslog
> > messages go to the Event log, unless you run the syslogd daemon.  You
> > should be able to install syslogd as a service using the
> > /bin/syslogd-config script, and then control it using
> > /etc/syslogd.conf.
> > Enjoy,
> > 	Igor
> > --
> > 				http://cs.nyu.edu/~pechtcha/
> >       |\      _,,,---,,_	    pechtcha AT XX DOT XXX DOT XXX | igor AT XXXXXX DOT XXX DOT XXX

Oh, and please re-read <http://cygwin.com/acronyms/#PCYMTNQREAIYR> -- I
would not expect anyone to mask addresses that I intentionally include in
my signature (any spam I get from that is my own fault).  It's only the
"From:" address that can cause unexpected problems for people...  Not that
I don't appreciate the effort, of course. :-)

> [snip]
>
> Thank you for the reply -- seems to work perfectly! The messages are
> being logged to /var/log/messages (the default as defined in
> /etc/syslog-ng.conf) and no longer to the Windows Application Event
> log.
>
> I noticed that in the Cygwin setup, syslogd has been replaced with
> syslog-ng (new generation?) "Syslog replacement daemon." So the config
> script is /usr/bin/syslog-ng-config, if anyone else is wanting to solve
> the same problem.

There are two syslogs.  One is part of inetutils (syslogd), one is its own
package (syslog-ng).  You can use either one.

> I also managed to find this thread
> (http://cygwin.com/ml/cygwin/2002-07/msg02075.html) after posting my
> original question. It describes, in detail, how to create a custom
> build of cron by modifying the source. A caveat, of course, is that
> upgrading will require a custom rebuild each time as mentioned at the
> top of the thread.

Ooh, that's old.  There are better means to avoid your original problem
than rebuilding cron...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019