At 2003-06-29 03:55 +0200, Ole Brumm wrote:
>I have just implemented the error_log function on my web site, as I find this 
>feature very useful. I have chosen to write to a file on the server.
>
>my question is: How can I make error_log write each error message on a NEW line 
>in the file I have chosen. Now, every message is written on a long line, which 
>is not very user friendly. I have tried to put \n on the end of the message, but 
>it didn`t have any effect.

When you want to be able to look at the log file
using some crummy Windows tool, make sure to
use "\r\n". Borland tools and Wordpad for
example can handle "\n"-only files, but IE
and Notepad not.

Also make sure you use double quotes and not
single quotes.

I'm using this under Unix and it works fine:
error_log(serialize($A)."\n",3,$log);

$log = the name of the file to log to
$A = is an array with data that I want to log

Greetings,
Jaap


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to