invisal
invisal

Reputation: 11181

Is it advisable to develop own PHP log?

Apache log and PHP log doesn't seem to provide much useful way to monitor performance of my script in production server. I was thinking of developing custom log for my script which log the following information:

  1. Time.
  2. Requested URL.
  3. Memory Peak Usage.
  4. How long does script take to run.

The log will be stored by file and grouped by it date.

The questions

  1. Does it dramatically affect the performance for high traffic website? If it only slightly affect, it is worth of trying.
  2. Is there any existed library or PHP extension that have already done that?

Upvotes: 0

Views: 90

Answers (2)

amitchhajer
amitchhajer

Reputation: 12850

use xdbug + webgrind for profiling

but they should be avoided once deployed to server.

and for logging purpose graylog2 is great

Upvotes: 0

Dunhamzzz
Dunhamzzz

Reputation: 14808

I think you're looking for xhprof.

Upvotes: 3

Related Questions