You are not logged in.

#1 2010-06-16 11:04:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,606
Website

which log level to use?

My /etc/conf.d/crond                                                                                 

#
# Parameters to be passed to crond
#
CROND_ARGS="-S -l info"

From the crond man page:

       -l loglevel
              log  events <= this level.  The default is `notice' (level 5).  Valid level names are as
              described in logger(1) and syslog(3): alert, crit, debug, emerg, err, error  (deprecated
              synonym  for  err),  info,  notice,  panic (deprecated synonym for emerg), warning, warn
              (deprecated synonym for warning).

I looked at the logger and syslog man pages but didn't find a description of these levels.  Google didn't help much either.  Anyone?  I want to avoid seeing an entry in my /var/log/crond.log each time a script I asked to run actually runs.  For example, both of these runs once per minute on my machine making my log file huge:

Jun 13 16:02:01 reborn crond[2893]: FILE /etc/cron.d/monitorix USER root PID 26996 /usr/sbin/monitorix.pl update
Jun 13 16:02:01 reborn crond[2893]: FILE /var/spool/cron/root USER root PID 26997 /root/bin/autocheck_mount > /dev/null 2>&1
Jun 13 16:03:01 reborn crond[2893]: FILE /etc/cron.d/monitorix USER root PID 27020 /usr/sbin/monitorix.pl update
Jun 13 16:03:01 reborn crond[2893]: FILE /var/spool/cron/root USER root PID 27021 /root/bin/autocheck_mount > /dev/null 2>&1
Jun 13 16:04:01 reborn crond[2893]: FILE /etc/cron.d/monitorix USER root PID 27044 /usr/sbin/monitorix.pl update
Jun 13 16:04:01 reborn crond[2893]: FILE /var/spool/cron/root USER root PID 27045 /root/bin/autocheck_mount > /dev/null 2>&1
Jun 13 16:05:01 reborn crond[2893]: FILE /etc/cron.d/monitorix USER root PID 27068 /usr/sbin/monitorix.pl update
Jun 13 16:05:01 reborn crond[2893]: FILE /var/spool/cron/root USER root PID 27069 /root/bin/autocheck_mount > /dev/null 2>&1
Jun 13 16:06:01 reborn crond[2893]: FILE /etc/cron.d/monitorix USER root PID 27114 /usr/sbin/monitorix.pl update
Jun 13 16:06:01 reborn crond[2893]: FILE /var/spool/cron/root USER root PID 27115 /root/bin/autocheck_mount > /dev/null 2>&1

Last edited by graysky (2010-06-16 11:13:23)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2010-06-18 16:02:28

quantumphaze
Member
From: Melbourne, Australia
Registered: 2008-11-14
Posts: 175

Re: which log level to use?

Trial an error!

try -f with the following: alert, crit, debug, emerg, err, info, notice, warning
until desired result. (redundant ones removed for your convenience)

By looking at the names I would guess that warning, err, crit, and emerg would show less respectively. The rest spill more with debug showing everything possible.


▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁

Offline

#3 2010-06-18 20:58:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,606
Website

Re: which log level to use?

Trial and error it is...

-l 9 = error
-l 8 = panic
-l 7 = debug
-l 6 = info
-l 5 = notice

Level 5 did the trick.

Last edited by graysky (2010-06-18 21:03:51)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB