You are here: Re: [PHP] syslog() /openlog() and wtf is LOG_LOCAL_0 « PHP « IT news, forums, messages
Re: [PHP] syslog() /openlog() and wtf is LOG_LOCAL_0

Posted by "Richard Lynch" on 09/28/48 11:20

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация