seahorse
seahorse

Reputation: 2470

Lightweight fast PHP Logging

Suppose we need to log some data on every php call on each request being made to the server on a high traffic- request heavy web application, to basically trace the actions taken by each client. I was considering saving them to memory and then logging all in one go to prevent frequent disk access. Is there a Php framework which already does this which I can reuse? I need to do this on the actual production server so I dont want to use stuff like xdebug.

Upvotes: 1

Views: 1615

Answers (2)

Aiphee
Aiphee

Reputation: 9156

I would use apc_store, i use it for light php request time analyzer

https://gist.github.com/aiphee/8004486cbd37b3f13efd271b8457cb38

Upvotes: 0

Eugene
Eugene

Reputation: 4389

Redis would be my suggestion.

There is a php library Rediska, that makes use of Redis server. At some point data can be dumped to db, i.e. when server load isn't at it highest.

Upvotes: 1

Related Questions