Re: Log->setIdent not behaving as I thought it would...
| From: | Jon Parise | Date: | Mon, 09 Jun 2003 22:07:57 +0000 |
| Subject: | Re: Log->setIdent not behaving as I thought it would... | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17226@lists.php.net to get a copy of this message | ||
On Tue, Jun 10, 2003 at 08:02:31AM +1000, Alex Hayes wrote:
> crack it yet..... however I was wondering if there was a possibility of
> added a small feature to the log classes. Just a small feature so that we
> can also set up a line feed in the $conf array.
>
> For example..
>
> $conf = array('mode' => 0600, 'linefeed' => "\n");
> $log_file = &Log::singleton('file', 'log.log', 'IDENT',
> $conf,
> PEAR_LOG_INFO);
I'll give it some thought, but it sounds reasonable to me. Perhaps we
could do away with the configuration option and just use the system's
standard linefeed sequence?
> This feature would also need to be added to the mail class, which currently
> uses \n for line feeds.
\r\n is the "standard" SMTP linefeed sequence. The Log_mail class
should always use \r\n (meaning it should not be configurable).
I'll fix the Log_mail class to use \r\n consistently shortly.
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)