11-07-2013
Yes, syslog can send the same message to many files. Each file has to filter for itself.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have just configured httpd.conf on a new Redhat 9 install. Below are my additions to httpd.conf. Everything works fine except that when typing http://spetnik.d2g.com into my web browser, I am sent to the "Default catch all" site. Any clues?
NameVirtualHost *:80
#Default catch all ... (5 Replies)
Discussion started by: Spetnik
5 Replies
2. Red Hat
Hi all
I have a RedHat Linux AS2.1 server that keep crashing/rebooting and there are no messages in the /var/log/messages file pointing to any problems. I had a look at the /etc/syslog.conf file to see what gets logged to /var/log/messages, but I don't know what else to add. Can anyone tell me... (1 Reply)
Discussion started by: soliberus
1 Replies
3. Solaris
Has anyone here configured a central syslog server using syslog-ng ?
I have set one up and I'm trying to tune the syslog-ng.conf file, both for the server and the client. I have found lots of linux example files, but not much on Solaris which is slightly different.
So if you have a Solaris... (5 Replies)
Discussion started by: Tornado
5 Replies
4. UNIX for Advanced & Expert Users
I have a RHEL box that I want to be the loghost for all of the other systems on my network and have set up a /logs partitions to hold all of the logs. I've also created a file called current.log that will contain daily logs and created it using the following command: cp /dev/null current.log. ... (4 Replies)
Discussion started by: goose25
4 Replies
5. Shell Programming and Scripting
How can i configure messages with warn priority to be logged in /var/log/mywarnings.log ? (1 Reply)
Discussion started by: g0dlik3
1 Replies
6. Solaris
I would like to configure the syslog.conf to have a good monitoring information about my system.
do you have any idea about best configuration from your experience in your Data Centers
BR, (5 Replies)
Discussion started by: maxim42
5 Replies
7. Red Hat
Hi all, :(
I am facing issue while I have updated in resolv.conf, after nework service restart, it was automatically deleted IP from resolv.conf file.
Could you please let me know what is the reason resolv.conf deleted any IP which I have manually updated, but it store only my router IP... (3 Replies)
Discussion started by: Pradipta Kumar
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Am trying to configure DNS server and trying to keep the information in /etc/resolv.conf file as:
search server
nameserver 192.168.0.10
when i restart the network service with #service network restart, resolv.conf file is changing as:
nameserver 192.168.0.10
search server -... (5 Replies)
Discussion started by: raosr020
5 Replies
9. HP-UX
Hi all,
There wasn't nsswitch.conf file in my HPUX server. So I copied /etc/nsswitch.files to /etc/nsswitch.conf and changed the content like below.
passwd: compat
group: compat
hosts: files dns nis
ipnodes: dns files
services: nis files
networks: nis... (2 Replies)
Discussion started by: sembii
2 Replies
10. Solaris
Hi Community
Which are the available entries to forward syslog in syslog.conf
i have put
*.err;kern.debug;daemon.notice;mail.crit;user.alert;user.emerg;kern.notice;auth.notice;kern.warning @172.16.200.50
and it's not going through.giving error message like below:
syslogd:... (2 Replies)
Discussion started by: bentech4u
2 Replies
SYSLOG(3) 1 SYSLOG(3)
syslog - Generate a system log message
SYNOPSIS
bool syslog (int $priority, string $message)
DESCRIPTION
syslog(3) generates a log message that will be distributed by the system logger.
For information on setting up a user defined log handler, see the syslog.conf(5) Unix manual page. More information on the syslog facili-
ties and option can be found in the man pages for syslog(3) on Unix machines.
PARAMETERS
o $priority
-$priority is a combination of the facility and the level. Possible values are:
syslog(3) Priorities (in descending order)
+------------+------------------------------------+
| Constant | |
| | |
| | Description |
| | |
+------------+------------------------------------+
| | |
| LOG_EMERG | |
| | |
| | system is unusable |
| | |
| | |
| LOG_ALERT | |
| | |
| | action must be taken immediately |
| | |
| | |
| LOG_CRIT | |
| | |
| | critical conditions |
| | |
| | |
| LOG_ERR | |
| | |
| | error conditions |
| | |
| | |
|LOG_WARNING | |
| | |
| | warning conditions |
| | |
| | |
|LOG_NOTICE | |
| | |
| | normal, but significant, condition |
| | |
| | |
| LOG_INFO | |
| | |
| | informational message |
| | |
| | |
| LOG_DEBUG | |
| | |
| | debug-level message |
| | |
+------------+------------------------------------+
o $message
- The message to send, except that the two characters %m will be replaced by the error message string (strerror) corresponding to
the present value of errno.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Using syslog(3)
<?php
// open syslog, include the process ID and also send
// the log to standard error, and use a user defined
// logging mechanism
openlog("myScriptLog", LOG_PID | LOG_PERROR, LOG_LOCAL0);
// some code
if (authorized_client()) {
// do something
} else {
// unauthorized client!
// log the attempt
$access = date("Y/m/d H:i:s");
syslog(LOG_WARNING, "Unauthorized client: $access {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
}
closelog();
?>
NOTES
On Windows NT, the syslog service is emulated using the Event Log.
Note
Use of LOG_LOCAL0 through LOG_LOCAL7 for the $facility parameter of openlog(3) is not available in Windows.
SEE ALSO
openlog(3), closelog(3).
PHP Documentation Group SYSLOG(3)