07-20-2012
Syslog is configured in /etc/syslog.conf.
Basically, there are three things to configure:
- facilities are the subsystems which generate the messages. There are, for instance "auth", "cron", "mail", etc.. The messages they generate are classified in
- priorities. Priorities denote the "severity" of an event a message tells about. This starts with "emerg" for emergency conditions and goes over "crit", "err", etc. down to "debug". Every lower class contains all the messages from the higher class plus some of its own. Once such a message is generated it triggers an
- action. This can be a file name, then the message is stored there. It could also be a remote machine, which would then handle the message (store it, or some other action). It could also be a "list of users", which would then get a mail with the message as text or a terminal, which will display the messages then - even without anybody being logged on there.
Every line in syslog.conf describes a facility/priority-combination and an action to start in case such a message is encountered. Notice, that priorities are inclusive: if you configure an action for "somefacility.warning" the action will be started for messages of the type "somefacility.err", "somefacility.crit", "somefacility.alert" and "somefacility.emerg" too.
It is also possible to use placeholders to specifiy the same rule for every facility (or some of them) at once.
See the man page of
syslog.conf and probably
sysklogd.conf for details.
I hope this helps.
bakunin
10 More Discussions You Might Find Interesting
1. Solaris
Hi there
I get the following message im my messages file 2 or 3 times a second
Dec 4 11:44:18 my-box in.timed: connect from localhost
I would like to stop in.timed from logging to syslog altogether as this message is filling up my disk.
I dont want to stop daemon.info altogether... (0 Replies)
Discussion started by: hcclnoodles
0 Replies
2. Solaris
dear all
i want to enable the below logs can you help me
/var/adm/xferlog
/var/spool/uucp/.Admin
thanx you (0 Replies)
Discussion started by: murad.jaber
0 Replies
3. Linux
Hi,
I want to enable hibernate in my machine.
when i click hibernate option, it is throwing message that hibernate is not enabled in kernel.
earlier, i was hibernating in the same machine with windows os.
any idea ?
Thx in advance.
Siva (0 Replies)
Discussion started by: Sivaswami
0 Replies
4. Post Here to Contact Site Administrators and Moderators
Hi Everyone. First, I want to thank all of you for letting me participate in this great group.
I am having a bit of a problem.
After I get an email from a responder, I login to make my reply.
In the mean time I get another response by email from another member, I go to reply to them and I... (6 Replies)
Discussion started by: Ccccc
6 Replies
5. Solaris
hi all,
i want to log every thing happen in my server
is any body can provide me with articals, pdf's
is that correct to log every thing in the system
what is the most important thing i should i log it (4 Replies)
Discussion started by: corvinusbsd
4 Replies
6. Solaris
hi,
i want to enable ssh on my solaris,i use $svcs -p ssh it showing
STATE STIME FMRI
maintenance 10:06:16 svc:/network/ssh:default
why the state in maintenance state, so i could n't able to login using ssh.
pls help me to enable ssh.
thanks, (1 Reply)
Discussion started by: shankr3
1 Replies
7. Fedora
Hi team,
Print Screen key is disabled in my machine. How can i enable it?? How do i do that via command line?? Or tell me in GUI.. Am using Linux Fedora 14 OS. (2 Replies)
Discussion started by: Adhi
2 Replies
8. Shell Programming and Scripting
Bash on Oracle Linux 6.3
I have a shell script whose output I want to redict to a log file. So, I can simply redirect the output as shown below.
# cat myscript.sh
#### I actually want some logging mechanism here which will redirect the output to a log file
echo 'hello world'
#... (3 Replies)
Discussion started by: John K
3 Replies
9. Linux
When unlocking a Linux server's console there's no event indicating successful logging
Is there a way I can fix this ?
I have the following in my rsyslog.conf
auth.info /var/log/secure
authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies
10. AIX
How could I enable logging of bind 9 forwarders messages? I have the following but forwarded requests do not show up in the logs even when running named in debug 10 mode:
logging {
channel syslog_errors { // this channel will send errors or
... (0 Replies)
Discussion started by: Devyn
0 Replies
LEARN ABOUT SUSE
log::dispatch::syslog
Log::Dispatch::Syslog(3) User Contributed Perl Documentation Log::Dispatch::Syslog(3)
NAME
Log::Dispatch::Syslog - Object for logging to system log.
SYNOPSIS
use Log::Dispatch;
my $log =
Log::Dispatch->new
( outputs =>
[ [ 'Syslog',
min_level => 'info',
ident => 'Yadda yadda' ]
]
);
$log->emerg( "Time to die." );
DESCRIPTION
This module provides a simple object for sending messages to the system log (via UNIX syslog calls).
Note that logging may fail if you try to pass UTF-8 characters in the log message. If logging fails and warnings are enabled, the error
message will be output using Perl's "warn".
CONSTRUCTOR
The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output:
o ident ($)
This string will be prepended to all messages in the system log. Defaults to $0.
o logopt ($)
A string containing the log options (separated by any separator you like). See the openlog(3) and Sys::Syslog docs for more details.
Defaults to ''.
o facility ($)
Specifies what type of program is doing the logging to the system log. Valid options are 'auth', 'authpriv', 'cron', 'daemon', 'kern',
'local0' through 'local7', 'mail, 'news', 'syslog', 'user', 'uucp'. Defaults to 'user'
o socket ($)
Tells what type of socket to use for sending syslog messages. Valid options are listed in "Sys::Syslog".
If you don't provide this, then we let "Sys::Syslog" simply pick one that works, which is the preferred option, as it makes your code
more portable.
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.12.1 2009-09-22 Log::Dispatch::Syslog(3)