Re: syslog() /openlog() and wtf is LOG_LOCAL_0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, July 4, 2005 8:32 am, Jochem Maas said:
> hi everyone,
>
> is there anyone out there that can explain the following constants:
>
> LOG_LOCAL0
> LOG_LOCAL1
> ...
> LOG_LOCAL*
>
> in relation to openlog() and syslog()
>
> basically I want to do two things:
>
> 1. log to the apache error log from a script called via the webserver
> 2. log to the apache error log from a script called via the cmdline
> (usually
> cron)
>
> I have 1. working on a dev server - but the live server doesn't seem to
> want to log jackshit. 2. I can't get working for the life of me....

#1 works if you set up php.ini and httpd.conf with their default values
and use http://php.net/error_log

#1 doesn't work if you change around your httpd.conf and/or php.ini to log
stuff somewhere else, or turn off error_log entirely.

#2 will probably work best if you use "logger"
man logger
Only I'm not 100% sure you can force logger to stick stuff into Apache's
log, and *WHY* you would do that when Apache IS NOT INVOLVED from your
command line is beyond my ken...

Seems to me you're just going to confuse things by sending error messages
to Apache's logs when they are NOT going through Apache.

Better to have a /var/log/php that the command line sends stuff to, imho.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux