Discussion:
Logging in PHP
Dan Joseph
2013-12-20 14:20:01 UTC
Permalink
Howdy Folks,

I was wondering if any of you had suggestions for logging with PHP? I'm
talking about things other than error_log().

I'm also using ZF2, which does have a logger class, but it seems more
manual entries than just automated logging of sorts.

Any ideas I can look at?
--
-Dan Joseph

http://www.danjoseph.me
http://www.dansrollingbbq.com
http://www.youtube.com/DansRollingBBQ
Andrew Ballard
2013-12-20 15:54:19 UTC
Permalink
I don't have examples since we're still working with ZF1, but if you're
using ZF2, I'd create a logger using the event manager.

Andrew
Post by Dan Joseph
Howdy Folks,
I was wondering if any of you had suggestions for logging with PHP? I'm
talking about things other than error_log().
I'm also using ZF2, which does have a logger class, but it seems more
manual entries than just automated logging of sorts.
Any ideas I can look at?
--
-Dan Joseph
http://www.danjoseph.me
http://www.dansrollingbbq.com
http://www.youtube.com/DansRollingBBQ
Joeri Thissen
2013-12-20 16:00:22 UTC
Permalink
I'd personally recommend using monolog: https://github.com/Seldaek/monolog
It's pretty flexible and easy to use.

Regards,

Joeri Thissen
Post by Andrew Ballard
I don't have examples since we're still working with ZF1, but if you're
using ZF2, I'd create a logger using the event manager.
Andrew
Post by Dan Joseph
Howdy Folks,
I was wondering if any of you had suggestions for logging with PHP? I'm
talking about things other than error_log().
I'm also using ZF2, which does have a logger class, but it seems more
manual entries than just automated logging of sorts.
Any ideas I can look at?
--
-Dan Joseph
http://www.danjoseph.me
http://www.dansrollingbbq.com
http://www.youtube.com/DansRollingBBQ
Jim Lucas
2013-12-20 16:19:10 UTC
Permalink
Post by Dan Joseph
Howdy Folks,
I was wondering if any of you had suggestions for logging with PHP? I'm
talking about things other than error_log().
I'm also using ZF2, which does have a logger class, but it seems more
manual entries than just automated logging of sorts.
Any ideas I can look at?
From the description above, I can't tell exactly what it is you are expecting
to be logged if you don't want to build "manual entries". If you don't create
something other that what already exists, what additional information are you
expecting the system to automatically log for you?
--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
George Wilson
2013-12-20 17:16:35 UTC
Permalink
I am not currently using but have in the past and really like it:
https://logging.apache.org/log4php/
log4php is based on log4j for Java. I am not sure what the status of
the project is right now but I would say it is worth a look.
Post by Jim Lucas
Post by Dan Joseph
Howdy Folks,
I was wondering if any of you had suggestions for logging with PHP? I'm
talking about things other than error_log().
I'm also using ZF2, which does have a logger class, but it seems more
manual entries than just automated logging of sorts.
Any ideas I can look at?
From the description above, I can't tell exactly what it is you are
expecting to be logged if you don't want to build "manual entries". If you
don't create something other that what already exists, what additional
information are you expecting the system to automatically log for you?
--
Jim Lucas
http://www.cmsws.com/
http://www.cmsws.com/examples/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Dan Joseph
2013-12-20 19:02:21 UTC
Permalink
Thanks for the suggestions! I'll take a look through these.

Jim, it was a poorly worded/asked question. You're right in I'd need to
add manual entries.

The only thing I can think of, since you asked, is normal event stuff, but
that's already logged anyway I suppose.
--
-Dan Joseph

http://www.danjoseph.me
http://www.dansrollingbbq.com
http://www.youtube.com/DansRollingBBQ
Continue reading on narkive:
Loading...