How to organise log file system

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
highjo
Forum Contributor
Posts: 118
Joined: Tue Oct 24, 2006 1:07 pm

How to organise log file system

Post by highjo »

Hi there .I'm in a middle of an application that does an API call with curl.I know i have to catch eventual errors to prevent users to see it and i'm thinking about how to make a log.The first things that comes to me is to send myself a email with every details but if anyone has better idea, please i'ld be glad to adopt it.My question should rather be How do you guys implement such a system?
Thanks
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Re: How to organise log file system

Post by Kieran Huggins »

Sending yourself an email is a valid solution, but it could fill up your inbox quickly.

PHP can be configured to write errors to a file in the current directory, which is recommended in production mode. I don't remember what that setting is called though...
User avatar
highjo
Forum Contributor
Posts: 118
Joined: Tue Oct 24, 2006 1:07 pm

Re: How to organise log file system

Post by highjo »

Yeah i've figured out a way to send myself an email with the PEAR Mail package but don't know how to organise it to have necassary info.
Thanks for the answer bro
Post Reply