Re: Timestamp needed in error log

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

 



quoth the John Hicks:
> > You don't explain much about your setup here, but on mine, I just write
> > my errors to the apache error log, which provides its own timestamp.
> >
> > Another option is to log to the system logs:
> > error_log = syslog  # in php.ini
> >
> > and use your loggers filter facilities to keep the php messages in a
> > separate file. Again, here syslog will provide its own timestamp.
> >
> > -d
>
> Thanks for the feedback, Darren!
>
> So at least one person in the world does get a filestamp in his error
> messages. That's useful information. From my googling I see number of
> references to the absence of timestamps so I was beginning to think that
> was the norm.
>
> Mine is a RHES4 box running the RH default configuration of PHP 4.3.9
> (RedHat's latest).
>
> Please let me know your distribution and PHP version so I can start to
> narrow this down.
>
> Thanks!
>
> John

Hey,

I am using Gentoo and PHP 5.1.2 with the hardened patch, but I am pretty sure 
the logging is identical to php4, as I only upgraded to 5 a few months ago,

In any event, how is your logging set up in php.ini? In mine I have:
display_errors = Off
log_errors = On

"error_log" is commented out, and this causes php to write directly to my 
Apache error_log, which as I mentioned, provides the timestamp itself.

I am not sure on this point, but if you have your "error_log" set 
to /some/random/file and you do not see a timestamp then I think it is safe 
to conclude that PHP does not provide this facility itself. So, if you need 
the timestamp you might need to use Apache's or syslog's logging facilities 
instead.

HTH

By the way, please CC the list so that others may benefit from this 
discussion...

-d
-- 
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972

Attachment: pgp3b1PXhzUnQ.pgp
Description: PGP signature


[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