Syslog.conf: looking for a simple answer on a simple question

Cheers!

In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to know if they are still logged or not.

I hope its a pretty simple question to get a simple answer :slight_smile: Just asking because the manuals I checked did not say "everything else that is not specified will be logged in whateveryoulike.log", so I am unsure.

Big thanks :slight_smile:

I think all vendors define all severe types. This is the minimum level, e.g. err includes crit.
You can test with the logger command

logger -p user.crit 'this is user.crit'

Can you paste the content of syslog.conf without the comments?

grep -v "^#" /etc/syslog.conf

Robin

unfortunately I am not the admin of the server and cannot issue commands, but could ask earlier for the settings:

.info;mail.none;authpriv.none;cron.none /var/log/messages
authpriv.
/var/log/secure
mail.* -/var/log/maillog
cron.* /var/log/cron
.emerg *
uucp,news.crit /var/log/spooler
local7.
/var/log/boot.log

As you can see crit and err level messages are not specified here, and I am not sure if they are not specified then they are logged at all.

The logger command that MadeInGermany suggests should not be a privileged command. What command can you not issue?

Looking at your records from syslog.conf, the theory is that the first record that captures *.info along with other things to /var/log/messages should actually capture all messages of severity level info or higher.

Try:-

tail -f /var/log/messages &
sleep 3
echo "Going to send message to syslog"
sleep 1
logger "This is a default message"
logger -p user.crit 'this is user.crit'

Does that produce any logging output?

Robin

Just tried logger and it triggers the alert in the messages. I did not know *.info means to log everything info or above. Thanks a log guys for the help, I got the answer I was looking for :slight_smile:

:b: You are most welcome. :b:

I've learnt lots from this board, and I've got lots more to learn still. Keep looking at threads that seem interesting - you can subscribe to them without posting if you wish under the "Thread Tools" and see what gets said by others and that's a great way to learn about other stuff which is interesting.

Robin :cool: