Re: Length of Exception text?
| From: | Jochem Maas | Date: | Tue, 09 Sep 2008 10:41:18 +0000 |
| Subject: | Re: Length of Exception text? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279718@lists.php.net to get a copy of this message | ||
Peter Ford schreef:
Jochem Maas wrote:ah yes, good catch. I think I wrote the syslog wrapper because I didn't have control over that setting at the time.ANR Daemon schreef:You want the php.ini setting: log_errors_max_len It defaults to 1024 characters: presumably that includes the preamble giving you 1015 or so to play with.Greetings, Jochem Maas. In reply to Your message dated Sunday, September 7, 2008, 20:56:37,are you printing to screen or to error_log (or syslog)? I believe error_log has a limit as to the length of the string that will actually be logged ... I can't remember whether this was php, apache or system related.I've been working on some PEAR-based app last week and I ran into problem. While I debugging app, my backtrace always trimmed at some point. First time I though it was my mistake, and switched back to standard "Exception" class. But nothing changed. If I print everything by hands, it's all full and good, but if I let PHP printwhat do you mean by:1. print by handCatch excetion and manually call getTraceAsString.2. let PHP printDo not catch exception, let PHP behave on it's own way.
If you set it to zero then you get unlimited log messages. 'course that might fill your logs up a bit...disk space is cheap :-) besides a decent setup should be rotating the logs, so your pretty safe from filling up the disk (assuming your logs aren't dumped to a seperate partition ... which is probably a good idea anyway ... to avoid crashing the whole system ... although I vaguely recall that apache might stop functioning if it can't write logs anymore ... again, not sure about that at all.