LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Syslog syntex (https://www.linuxquestions.org/questions/linux-server-73/syslog-syntex-618347/)

tommy_cs 02-03-2008 07:14 AM

Syslog syntex
 
Here is a portion from syslog configuration file

...

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

# Everybody gets emergency messages
*.emerg *

....


Do anyonw know the meaning of the * ? What is the output file it represent?

druuna 02-03-2008 07:22 AM

Hi,

As stated in syslog.conf's manpage: An asterisk ("*'') can be used to specify all facilities or all levels.

Hope this helps.

tommy_cs 02-04-2008 09:02 AM

Quote:

Originally Posted by druuna (Post 3044467)
Hi,

As stated in syslog.conf's manpage: An asterisk ("*'') can be used to specify all facilities or all levels.

Hope this helps.

I saw an example on the web( forgot where )
using "*" instead of specifing a path to a log file.

not sure it is valid, I will try it out when i'm free.

frndrfoe 02-04-2008 09:14 AM

Like this?
Code:

# Everybody gets emergency messages
*.emerg                                                *

That means that it goes to all logs(i think) and to everyone logged in.

druuna 02-04-2008 09:21 AM

Hi,

Quote:

Originally Posted by tommy_cs (Post 3045623)
I saw an example on the web( forgot where )
using "*" instead of specifing a path to a log file.

not sure it is valid, I will try it out when i'm free.

It is valid.

You can use the * in the 'action' field to tell syslog that it should output this message to all available (logged in) users, logs and (if defined) pipes. The manpage cuts it a bit short: An asterisk. Selected messages are written to all logged-in users..

Hope this helps.

tommy_cs 02-05-2008 06:35 AM

Quote:

Originally Posted by druuna (Post 3045641)
Hi,



It is valid.

You can use the * in the 'action' field to tell syslog that it should output this message to all available (logged in) users, logs and (if defined) pipes. The manpage cuts it a bit short: An asterisk. Selected messages are written to all logged-in users..

Hope this helps.

I see.. Thanks!!


All times are GMT -5. The time now is 06:32 PM.