Re: [PHP] Debugging Log
At 6:19 PM -0400 7/12/06, Michael B Allen wrote: On Wed, 12 Jul 2006 22:44:23 +0100 Stut [EMAIL PROTECTED] wrote: Michael B Allen wrote: Thanks for the tip dipshit. Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet /dev/null, I hope you live happily ever after. Oh, no. What am I going to do now? You're like The Man on this list. I'll never figure out how to write to a logfile now. I might as well just give up and use VB or something. I don't know about you using VB or something, but for Stut being The Man I would support that claim. tedd ps: When there's no enemies about, it's not a good idea to burn bridges. -- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [totaly off t****] Re: [PHP] Debugging Log
tedd wrote: At 6:19 PM -0400 7/12/06, Michael B Allen wrote: On Wed, 12 Jul 2006 22:44:23 +0100 Stut [EMAIL PROTECTED] wrote: Michael B Allen wrote: Thanks for the tip dipshit. Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet /dev/null, I hope you live happily ever after. Oh, no. What am I going to do now? You're like The Man on this list. I'll never figure out how to write to a logfile now. I might as well just give up and use VB or something. I don't know about you using VB or something, I would encourage it ;-) but for Stut being The Man I would support that claim. borders on=nonsense but that leaves so little room for the 'Other Men' - and could turn into a pissing match (you know how John Nichel likes a good pissing match :-P) It does always surprise me that people start flaming others without first doing a little check as to the probably karma/kudos of the intended 'victim' (Stut has atleast 124 posts to his name this year alone and I don't see many questions among them). personally I tend to only shovel shit to people with nexrt to no karma/kudos - it's so much safer ;-) /borders tedd ps: When there's no enemies about, it's not a good idea to burn bridges. semtex is better any day of the week ;- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael B Allen wrote: What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? http://php.net/syslog or use a file. There are also various JS-based solutions floating around. - -Stut -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEtTvgP9na3/DT5jQRAoD1AJ9CJDHTpgTJ6e+Kact0bIarlKYXPwCgs2QB raWCYaDcLjfwWG3dTCsnhH8= =4ozG -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Debugging Log
http://pear.php.net/package/Log/ works well for me. Supports writing messages to files, to a separate window via JavaScript, probably syslog as well as a few others. -Original Message- From: Michael B Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 2:02 PM To: php-general@lists.php.net Subject: [PHP] Debugging Log What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- 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
Re: [PHP] Debugging Log
I wrote my own, very simple, very easy. I think the code is in the archive somewhere. Otheres have written similar functions. CODE +++ function logError ($logentry, $lgname) { // simple function to log errors to text/log file. $logfile = @fopen ($lgname, a+); if (!$logfile) { echo (\n\n ERROR: Failed to open $lgname\n\n); } else { fwrite ($logfile, [.date (D M d Y h:i:s).] [$logentry]\n); fclose ($logfile); } } where you want to log logError($username.' has successfully logged in.','account.log'); CODE +++ Lately I have been using the syslog from php. On 7/12/06, KermodeBear [EMAIL PROTECTED] wrote: http://pear.php.net/package/Log/ works well for me. Supports writing messages to files, to a separate window via JavaScript, probably syslog as well as a few others. -Original Message- From: Michael B Allen [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 2:02 PM To: php-general@lists.php.net Subject: [PHP] Debugging Log What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
Michael B Allen wrote: What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? there is also error_log() (and the 'error_log' ini setting) - I abuse it for debugging now and again. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
Ahh yes I do that as well, I knew there was another other then syslog. On 7/12/06, Jochem Maas [EMAIL PROTECTED] wrote: Michael B Allen wrote: What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? there is also error_log() (and the 'error_log' ini setting) - I abuse it for debugging now and again. Mike -- 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
Re: [PHP] Debugging Log
On Wed, 12 Jul 2006 19:13:53 +0100 Stut [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael B Allen wrote: What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? http://php.net/syslog or use a file. There are also various JS-based solutions floating around. I don't think I want to write boring CC failures to syslog. And error_log doesn't write a timestamp. But I guess this isn't rocket surgery. I think I can figure out how to maybe prefix error_log entries with a TS. Thanks, Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael B Allen wrote: On Wed, 12 Jul 2006 19:13:53 +0100 Stut [EMAIL PROTECTED] wrote: Michael B Allen wrote: What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? http://php.net/syslog or use a file. There are also various JS-based solutions floating around. I don't think I want to write boring CC failures to syslog. And error_log doesn't write a timestamp. But I guess this isn't rocket surgery. I think I can figure out how to maybe prefix error_log entries with a TS. So polluting the PHP error log is better than directing it to a log file via the syslog facility? Your choice, but remember that syslog is much more than just one log. If that's a revelation to you I suggest some RTFM is needed before dismissing the option. - -Stut -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEtVfr2WdB7L+YMm4RAqEiAKCf/w6MIaT8e7r72uOjjaMgpF+JUACfauxm u3AaddpReuPabSvWPxmHlms= =PHUz -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
On Wed, 12 Jul 2006 21:13:31 +0100 Stut [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael B Allen wrote: On Wed, 12 Jul 2006 19:13:53 +0100 Stut [EMAIL PROTECTED] wrote: Michael B Allen wrote: What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? http://php.net/syslog or use a file. There are also various JS-based solutions floating around. I don't think I want to write boring CC failures to syslog. And error_log doesn't write a timestamp. But I guess this isn't rocket surgery. I think I can figure out how to maybe prefix error_log entries with a TS. So polluting the PHP error log is better than directing it to a log file via the syslog facility? Your choice, but remember that syslog is much more than just one log. If that's a revelation to you I suggest some RTFM is needed before dismissing the option. Thanks for the tip dipshit. -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael B Allen wrote: Thanks for the tip dipshit. Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet /dev/null, I hope you live happily ever after. - -Stut -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEtW032WdB7L+YMm4RAgAfAJ9hHl56og8T0ut0wjnbNq6C1GM7WgCeIIlU Kiko9JIADAOO07l0/vS6qaY= =6Fs+ -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
On Wed, 12 Jul 2006 22:44:23 +0100 Stut [EMAIL PROTECTED] wrote: Michael B Allen wrote: Thanks for the tip dipshit. Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet /dev/null, I hope you live happily ever after. Oh, no. What am I going to do now? You're like The Man on this list. I'll never figure out how to write to a logfile now. I might as well just give up and use VB or something. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Debugging Log
Michael B Allen wrote: On Wed, 12 Jul 2006 22:44:23 +0100 Stut [EMAIL PROTECTED] wrote: Michael B Allen wrote: Thanks for the tip dipshit. Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet /dev/null, I hope you live happily ever after. Oh, no. What am I going to do now? You're like The Man on this list. I'll never figure out how to write to a logfile now. I might as well just give up and use VB or something. please do. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php