SPUG: /var/log/messages

Mikel Tidwell dragon at dreamhaven.net
Thu May 30 18:38:53 CDT 2002


On Thu, 30 May 2002, Colin Meyer wrote:

-> Remember me? ;-)

Yup.  Seen you on the list... I guess I've just never thought to write ^^;
We can catch up in another email ;>

-> There is a (POSIX?) C api for emitting syslog messages.  There is a Perl
-> module, part of the standard distro, for doing this from Perl programs.
-> See: perldoc Sys::Syslog

I happened to find this after sending my message, but haven't had any luck
actually getting a message to appear in messages.  This is my very basic
testing script so far.  (Since writing to messages was first, that's all I
have):

#!/usr/bin/perl -w

use Sys::Syslog qw(:DEFAULT setlogsock);

setlogsock('inet');
openlog('mysqlcheck.pl','cons,pid','user');
syslog('debug', 'I like testing.');
closelog();

----- Here's /etc/syslog.conf (which I didn't know about, thanks :) ------

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                /var/log/messages

debug.*                                                 /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  /var/log/maillog

# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
--------------------------------------------------------------------------

I'm sure I'm missing something simple... please tell me what it is. ;>

Meanwhile I'm going for a little walk.. this project frustrates me :P

 _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _
  -- Mikel Tidwell   President: RPGamer -- http://www.rpgamer.com/
   MSNM: FireMyst    Personal Home Page -- http://dragon.rpgamer.com/
 - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ - _ -





 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list