From log4php-dev-eric91@example.com Sun Feb 10 14:44:38 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 26651 invoked from network); 10 Feb 2008 14:44:38 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 10 Feb 2008 14:44:38 -0000
Received: (qmail 15170 invoked by uid 500); 10 Feb 2008 14:44:32 -0000
Delivered-To: eric91@example.com
Received: (qmail 15144 invoked by uid 500); 10 Feb 2008 14:44:32 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 15133 invoked by uid 99); 10 Feb 2008 14:44:32 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Feb 2008 06:44:31 -0800
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: local policy)
Received: from [83.161.120.155] (HELO mailout1.informatik.tu-muenchen.de) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Feb 2008 14:43:47 +0000
Received: from [83.161.120.155] (as40115.pc.nus.edu.sg [83.161.120.155])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by mail.in.tum.de (Postfix) with ESMTP id 42B9F6924
	for <eric91@example.com>; Sun, 10 Feb 2008 15:44:06 +0100 (CET)
Mime-Version: 1.0 (Apple Message framework v752.3)
Content-Transfer-Encoding: 7bit
Message-Id: <eric91@example.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
To: eric91@example.com
From: Samuel Kerschbaumer <eric91@example.com>
Subject: LoggerDatePatternConverter888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onvert regular expression
Date: Sun, 10 Feb 2008 22:45:53 +0800
X-Mailer: Apple Mail (2.752.3)
X-Virus-Scanned: ClamAV using ClamSMTP
X-Virus-Checked: Checked by ClamAV on apache.org

Hello.

I think there is a bug in the LoggerDatePatternConverter888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onvert()  
method.
In this method there is a call to ereg_replace("[^\\]u", sprintf(',% 
03d', $usecs), which should be like ereg_replace("[^\\\\]u", sprintf 
(',%03d', $usecs) instead.
The reason is that there are two quoting mechanisms in effect: The  
quoting in a PHP string and the quoting of the regexp library.
Strangely the actual call works with some of my PHP installations,  
whereas it causes trouble on others.

Could this be fixed?

Samuel

From log4php-dev-eric91@example.com Mon Feb 11 19:19:36 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 39338 invoked from network); 11 Feb 2008 19:19:36 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 11 Feb 2008 19:19:36 -0000
Received: (qmail 96162 invoked by uid 500); 11 Feb 2008 19:19:29 -0000
Delivered-To: eric91@example.com
Received: (qmail 96146 invoked by uid 500); 11 Feb 2008 19:19:29 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 96135 invoked by uid 99); 11 Feb 2008 19:19:29 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2008 11:19:29 -0800
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: domain of eric91@example.com designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO gotgenie.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Mon, 11 Feb 2008 19:18:57 +0000
Received: (qmail 28626 invoked from network); 11 Feb 2008 19:18:56 -0000
Received: from tatu (HELO ?83.161.120.155?) (83.161.120.155)
  by gotgenie.com with SMTP; 11 Feb 2008 19:18:56 -0000
Message-ID: <eric91@example.com>
Date: Mon, 11 Feb 2008 11:19:03 -0800
From: Marshall Pierce <eric91@example.com>
User-Agent: Thunderbird 83.161.120.155 (X11/20071119)
MIME-Version: 1.0
To: Log4PHP Dev <eric91@example.com>
Subject: Re: LoggerDatePatternConverter888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onvert regular expression
References: <eric91@example.com>
In-Reply-To: <eric91@example.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org

Samuel Kerschbaumer wrote:
> Hello.
> 
> I think there is a bug in the LoggerDatePatternConverter888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onvert() method.
> In this method there is a call to ereg_replace("[^\\]u",
> sprintf(',%03d', $usecs), which should be like ereg_replace("[^\\\\]u",
> sprintf(',%03d', $usecs) instead.
> The reason is that there are two quoting mechanisms in effect: The
> quoting in a PHP string and the quoting of the regexp library.
> Strangely the actual call works with some of my PHP installations,
> whereas it causes trouble on others.
> 
> Could this be fixed?
> 
> Samuel

This handling of escaping 'u' to '\u' seems entirely unnecessary since
php's date() already lets you escape anything you want with a '\'. Try
deleting the extra stuff and have the method simply return the output of
date() on the date format and timestamp.

-Marshall

From log4php-dev-eric91@example.com Tue Feb 12 15:35:26 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 39214 invoked from network); 12 Feb 2008 15:35:26 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 12 Feb 2008 15:35:26 -0000
Received: (qmail 31692 invoked by uid 500); 12 Feb 2008 15:35:19 -0000
Delivered-To: eric91@example.com
Received: (qmail 31674 invoked by uid 500); 12 Feb 2008 15:35:19 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 31663 invoked by uid 99); 12 Feb 2008 15:35:19 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2008 07:35:19 -0800
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: local policy)
Received: from [83.161.120.155] (HELO mailout1.informatik.tu-muenchen.de) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2008 15:34:34 +0000
Received: from [83.161.120.155] (spnp206078.spnp.nus.edu.sg [83.161.120.155])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by mail.in.tum.de (Postfix) with ESMTP id D86AFA1EF
	for <eric91@example.com>; Tue, 12 Feb 2008 16:34:54 +0100 (CET)
Mime-Version: 1.0 (Apple Message framework v752.3)
In-Reply-To: <eric91@example.com>
References: <eric91@example.com> <eric91@example.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Message-Id: <eric91@example.com>
Content-Transfer-Encoding: 7bit
From: Samuel Kerschbaumer <eric91@example.com>
Subject: Re: LoggerDatePatternConverter888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onvert regular expression
Date: Tue, 12 Feb 2008 23:36:40 +0800
To: "Log4PHP Dev" <eric91@example.com>
X-Mailer: Apple Mail (2.752.3)
X-Virus-Scanned: ClamAV using ClamSMTP
X-Virus-Checked: Checked by ClamAV on apache.org


Am 12.02.2008 um 03:19 schrieb Marshall Pierce:

> Samuel Kerschbaumer wrote:
>> Hello.
>>
>> I think there is a bug in the LoggerDatePatternConverter888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4onvert 
>> () method.
>> In this method there is a call to ereg_replace("[^\\]u",
>> sprintf(',%03d', $usecs), which should be like ereg_replace("[^\\\ 
>> \]u",
>> sprintf(',%03d', $usecs) instead.
>> The reason is that there are two quoting mechanisms in effect: The
>> quoting in a PHP string and the quoting of the regexp library.
>> Strangely the actual call works with some of my PHP installations,
>> whereas it causes trouble on others.
>>
>> Could this be fixed?
>>
>> Samuel
>
> This handling of escaping 'u' to '\u' seems entirely unnecessary since
> php's date() already lets you escape anything you want with a '\'. Try
> deleting the extra stuff and have the method simply return the  
> output of
> date() on the date format and timestamp.
>
> -Marshall

Hmm I think the purpose of this code was to support 'u' for the  
milliseconds in the date format, since date() supports u only since  
PHP 5.2.2.
Since Log4PHP now focus only on PHP5 support these lines are  
unnecessary and should be removed.

Samuel


From log4php-dev-eric91@example.com Fri Feb 15 03:08:28 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 26051 invoked from network); 15 Feb 2008 03:08:28 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 15 Feb 2008 03:08:28 -0000
Received: (qmail 21347 invoked by uid 500); 15 Feb 2008 03:08:22 -0000
Delivered-To: eric91@example.com
Received: (qmail 21334 invoked by uid 500); 15 Feb 2008 03:08:22 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 21323 invoked by uid 99); 15 Feb 2008 03:08:22 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Feb 2008 19:08:22 -0800
X-ASF-Spam-Status: No, hits=-2000.0 required=10.0
	tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Fri, 15 Feb 2008 03:07:59 +0000
Received: (qmail 25991 invoked from network); 15 Feb 2008 03:08:07 -0000
Received: from localhost (83.161.120.155)
  by localhost with SMTP; 15 Feb 2008 03:08:07 -0000
Date: Fri, 15 Feb 2008 12:08:03 +0900
From: Hiroaki Kawai <eric91@example.com>
X-Mailer: EdMax Ver5.12
MIME-Version: 1.0
To: eric91@example.com
Subject: setting ENV vars
Message-Id: <eric91@example.com>
Content-Type: multipart/mixed; boundary="------------Boundary_wBhDqF7NL(rZeAP"
X-Virus-Checked: Checked by ClamAV on apache.org


--------------Boundary_wBhDqF7NL(rZeAP
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

log4php currently supports the following environment 
variables (in LoggerManager.php)

$_ENV['log4php.defaultInitOverride']
$_ENV['log4php.configuration']

I'm wondering how people are setting this value.
It is very hard to set an environment value including . (dot)
I could set it by writing a special C code, but these vars 
should be set in shell.

And more, I wanted to add another method to set 
these values, $_SERVER.

I'd like to suggest a patch attached to this mail.



--------------Boundary_wBhDqF7NL(rZeAP
Content-Type: application/octet-stream; name="log4php.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="log4php.patch"

SW5kZXg6IHRydW5rL3NyYy9tYWluL3BocC9Mb2dnZXJNYW5hZ2VyLnBocA0KPT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PQ0KLS0tIHRydW5rL3NyYy9tYWluL3BocC9Mb2dnZXJNYW5hZ2VyLnBocAkocmV2aXNp
b24gNjI3O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kZJR1VSQVRJT04nLCB0cmltKCRfRU5WWydsb2c0cGhwX2Nv
bmZpZ3VyYXRpb24nXSkpOworICAgIH0gZWxzZWlmIChpc3NldCgkX1NFUlZFUlsnbG9nNHBo
cF9jb25maWd1cmF0aW9uJ10pKSB7CisgICAgICAgIC8qKgorICAgICAgICAgKiBAaWdub3Jl
CisgICAgICAgICAqLworICAgICAgICBkZWZpbmUoJ0xPRzRQSFBfQ09ORklHVVJBVElPTics
IHRyaW0oJF9TRVJWRVJbJ2xvZzRwaHBfY29uZmlndXJhdGlvbiddKSk7CiAgICAgfSBlbHNl
IHsKICAgICAgICAgLyoqCiAgICAgICAgICAqIENvbmZpZ3VyYXRpb24gZmlsZS4KQEAgLTE4
Nyw2ICsyMTMsOCBAQA0KICAgICAgICAgICogKGluIG9yZGVyKTo8L3A+CiAgICAgICAgICAq
CiAgICAgICAgICAqIC0gdGhlIDxjb2RlPiRfRU5WWydsb2c0cGhwLmNvbmZpZ3VyYXRpb24n
XTwvY29kZT4gZW52aXJvbWVudCB2YXJpYWJsZS4KKyAgICAgICAgICogLSB0aGUgPGNvZGU+
JF9FTlZbJ2xvZzRwaHBfY29uZmlndXJhdGlvbiddPC9jb2RlPiBlbnZpcm9tZW50IHZhcmlh
YmxlLgorICAgICAgICAgKiAtIHRoZSA8Y29kZT4kX1NFUlZFUlsnbG9nNHBocF9jb25maWd1
cmF0aW9uJ108L2NvZGU+IHZhcmlhYmxlLgogICAgICAgICAgKiAtIGRlZmF1bHRzIHRvICds
b2c0cGhwLnByb3BlcnRpZXMnLgogICAgICAgICAgKgogICAgICAgICAgKiBAdmFyIHN0cmlu
Zwp=

--------------Boundary_wBhDqF7NL(rZeAP--

From log4php-dev-eric91@example.com Mon Feb 25 19:37:55 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 94003 invoked from network); 25 Feb 2008 19:37:53 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 25 Feb 2008 19:37:53 -0000
Received: (qmail 36894 invoked by uid 500); 25 Feb 2008 19:37:48 -0000
Delivered-To: eric91@example.com
Received: (qmail 36868 invoked by uid 500); 25 Feb 2008 19:37:47 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 36857 invoked by uid 99); 25 Feb 2008 19:37:47 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 11:37:47 -0800
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: domain of eric91@example.com designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO gotgenie.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Mon, 25 Feb 2008 19:37:14 +0000
Received: (qmail 22679 invoked from network); 25 Feb 2008 19:37:14 -0000
Received: from radell9400.genius.local (HELO ?83.161.120.155?) (83.161.120.155)
  by gotgenie.com with SMTP; 25 Feb 2008 19:37:14 -0000
Message-ID: <eric91@example.com>
Date: Mon, 25 Feb 2008 11:37:22 -0800
From: Marshall Pierce <eric91@example.com>
User-Agent: Thunderbird 83.161.120.155 (X11/20071119)
MIME-Version: 1.0
To: Log4PHP Dev <eric91@example.com>
Subject: Re: PHP 5-ized log4php
References: <eric91@example.com> <eric91@example.com> <eric91@example.com>
In-Reply-To: <eric91@example.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org

Marshall Pierce wrote:
> Knut Urdalen wrote:
>> Marshall Pierce wrote:
>>> Over the past little while, I've been working here and there on
>>> improving log4php to use PHP 5 features for my employer, and I've gotten
>>> the OK to contribute my improvements back to the project. I'm not quite
>>> finished with my improvements, but I wanted to get some feedback as I
>>> continue forward.
>>>
>>> Improvements:
>>>
>>> - Relocate and rename classes to support autoloading (and provide an
>>> autoload implementation)
>>> - Move from php4 'var' to private/protected as appropriate and add
>>> getters/setters as needed
>>> - Bug fixes / other minor refactorings
>>> - Use exceptions (still remaining to be done: make sure exceptions will
>>> not bubble up into code that uses log4php)
>>> - Reformat code (mostly -- there are still parts that I haven't gotten
>>> to yet) to match the standard we use at work
>> Thanks for sharing your fork of the project.
>>
>> log4php already works with PHP 5:
>> http://svn.apache.org/repos/asf/incubator/log4php/trunk/src/main/php/
> 
> Very true (after all, 0.9 worked with PHP5), but it still has leftover
> PHP4 cruft like 'var' and use of PHP references (&).
> 
>> and we have a bunch of working examples:
>> http://svn.apache.org/repos/asf/incubator/log4php/trunk/src/examples/php/
> 
> I shall take a look at those and make sure they all work as expected.
> 
>> and unit tests (using PHPUnit 3.2):
>> http://svn.apache.org/repos/asf/incubator/log4php/trunk/src/test/php/
> 
> All the unit tests pass (after some modifications to use my class names
> instead of the old ones, and other minor tweaks).
> 
>> The PHP 5 version of log4php was the reason why the whole incubation
>> process was restarted and I used all the examples and the unit tests to
>> hunt down bugs.
>>
>> I prefer to stick with the current naming convention and focus on the
>> functionality. When I started working on the PHP 5 version I did the
>> same thing as you did and ended up with the same directory structure and
>> naming convention. But after a while I realized that I was just wasting
>> hours for no good reason and would break existing applications, so I
>> started focusing on the stuff that mattered.
> 
> I disagree that changing the name convention is not a good reason to change.
> 
> First of all, it doesn't follow the PEAR standard of
> Packagename_Subpackage_Etc.
> 
> Second, many of the classes are named confusingly: LoggerHierarchy
> objects are referred to as 'repository' objects in variable names and
> comments (which makes sense since the class really should be named
> something to do with a Repository); Logger is a poor class prefix to use
> since many classes do not actually have anything to do with a Logger
> object, etc.
> 
> Third, classes are placed in unhelpful directory structures: 'spi' and
> 'varia' are not meaningful directory names; 'xml' contains a
> configuration class that would make more sense living elsewhere;
> 'config' does not actually contain all or even most of the classes that
> have to do with configuration, etc.
> 
> In any case, I think that it is reasonable to continue to maintain the
> old code base (backporting bug fixes) to let users maintain their
> investment in any old code they might have that depends on it
> (especially PHP4 users), while simultaneously offering a new, cleaner
> codebase for PHP5 users. The migration path, for those who choose to
> switch to the new codebase, would be quite easy as well. Just change the
> class names specified in the config file and find/replace
> LoggerFactory888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4tory to be the new method call.
> 
> As far as Curt Arnold's objection that a monolithic changeset like mine
> is hard to understand, that's completely understandable, and I agree
> that it does make it more difficult to see exactly what was changed.
> However, that does not mean that it *is* difficult -- just *more*
> difficult. While files have been moved around and renamed, the code has
> not been drastically altered beyond that. Most of my fixes have been
> small, isolated changes which will be easy for interested parties to
> find by just looking through the old and new versions. Log4PHP is not a
> big project (about 10k lines), so this is not infeasible.
> 
>> You mention that you have done various bug fixes. It's really
>> appreciated if you can file patches against the current code base. While
>> writing the PHP 5 version I fixed a whole lot of minor things. I'm
>> pretty sure you have find some new, and that many of them are already
>> fixed.
> 
> I'll take a look at what's happened in trunk since 0.9 and make sure any
>  bug fixes are reflected in my fork.
> 
>> About new functionality we already have a lot of stuff on our TODO-list:
>> http://svn.apache.org/repos/asf/incubator/log4php/trunk/TODO
>>
>> I see that one of the reasons behind your fork is the autoload
>> mechanism. We should provide an autoload method in log4php, but this
>> could be done with a associative class mapping array, where the
>> classname is the key and the relative file path is the value. That is a
>> better solution of two reasons:
>> 1) log4php can provide an autoload method with the current naming
>> convention
>> 2) The performance is much better because it's simply a lookup in an
>> array instead of IO-access and checking if the class file that are to be
>> loaded actually exists, which is unnecessary. (log4* should be as
>> lightweight as possible so this is important)
>>
>> Best regards,
>> Knut Urdalen
> 
> I've done some simple performance tests, and my autoload implementation
> is at a statistical dead heat with one using an associative array.
> (There is variability as to which would come in faster in a given run,
> and all runs indicated that regardless of which one was clocked as
> faster, they were extremely close, sometimes as little as .01s apart
> after 1000 iterations.) In any case, far more time was used actually
> starting the PHP interpreter and parsing files than it was during
> autoloading, let alone actual code execution.
> 
> Marshall Pierce

Should I interpret this list's continued silence on this topic as
unwillingness to adopt my changes?

-Marshall

From log4php-dev-eric91@example.com Mon Feb 25 21:56:12 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 53493 invoked from network); 25 Feb 2008 21:56:12 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 25 Feb 2008 21:56:12 -0000
Received: (qmail 52654 invoked by uid 500); 25 Feb 2008 21:56:07 -0000
Delivered-To: eric91@example.com
Received: (qmail 52629 invoked by uid 500); 25 Feb 2008 21:56:07 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 52598 invoked by uid 99); 25 Feb 2008 21:56:07 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 13:56:06 -0800
X-ASF-Spam-Status: No, hits=-0.0 required=10.0
	tests=SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: domain of eric91@example.com designates 83.161.120.155 as permitted sender)
Received: from [83.161.120.155] (HELO gotgenie.com) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Mon, 25 Feb 2008 21:55:21 +0000
Received: (qmail 13525 invoked from network); 25 Feb 2008 21:55:30 -0000
Received: from tatu.genius.local (HELO ?83.161.120.155?) (83.161.120.155)
  by gotgenie.com with SMTP; 25 Feb 2008 21:55:30 -0000
Message-ID: <eric91@example.com>
Date: Mon, 25 Feb 2008 13:55:40 -0800
From: Marshall Pierce <eric91@example.com>
User-Agent: Thunderbird 83.161.120.155 (X11/20071119)
MIME-Version: 1.0
To: Log4PHP Dev <eric91@example.com>
Subject: Re: setting ENV vars
References: <eric91@example.com>
In-Reply-To: <eric91@example.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org

Hiroaki Kawai wrote:
> Hi,
> 
> log4php currently supports the following environment 
> variables (in LoggerManager.php)
> 
> $_ENV['log4php.defaultInitOverride']
> $_ENV['log4php.configuration']
> 
> I'm wondering how people are setting this value.
> It is very hard to set an environment value including . (dot)
> I could set it by writing a special C code, but these vars 
> should be set in shell.
> 
> And more, I wanted to add another method to set 
> these values, $_SERVER.
> 
> I'd like to suggest a patch attached to this mail.
> 
> 

Good idea about changing the environment variable names to something
more easily settable, but I'm curious why the config file to use would
ever be defined in $_SERVER -- could you explain why that's useful? I
think most httpd's will let you set environment variables.

-Marshall

From log4php-dev-eric91@example.com Tue Feb 26 02:19:14 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 42700 invoked from network); 26 Feb 2008 02:19:14 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 26 Feb 2008 02:19:14 -0000
Received: (qmail 39373 invoked by uid 500); 26 Feb 2008 02:19:09 -0000
Delivered-To: eric91@example.com
Received: (qmail 39353 invoked by uid 500); 26 Feb 2008 02:19:09 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 39342 invoked by uid 99); 26 Feb 2008 02:19:09 -0000
Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2008 18:19:09 -0800
X-ASF-Spam-Status: No, hits=1.2 required=10.0
	tests=SPF_NEUTRAL
X-Spam-Check-By: apache.org
Received-SPF: neutral (athena.apache.org: local policy)
Received: from [83.161.120.155] (HELO QMTA03.westchester.pa.mail.comcast.net) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2008 02:18:34 +0000
Received: from OMTA03.westchester.pa.mail.comcast.net ([83.161.120.155])
	by QMTA03.westchester.pa.mail.comcast.net with comcast
	id u1BL1Y0050bG4ec5305p00; Tue, 26 Feb 2008 02:18:08 +0000
Received: from [83.161.120.155] ([83.161.120.155])
	by OMTA03.westchester.pa.mail.comcast.net with comcast
	id u2JZ1Y00G34ghu93P00000; Tue, 26 Feb 2008 02:18:40 +0000
X-Authority-Analysis: v=1.0 c=1 a=KWwI-9AgcOaBBBww4vIA:9
 a=3ofA59K-kQ-pw3i7ay8nptFGzpQA:4 a=WuK_CZDBSqoA:10
Message-Id: <eric91@example.com>
From: Curt Arnold <eric91@example.com>
To: "Log4PHP Dev" <eric91@example.com>
In-Reply-To: <eric91@example.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v919.2)
Subject: Re: PHP 5-ized log4php
Date: Mon, 25 Feb 2008 20:18:33 -0600
References: <eric91@example.com> <eric91@example.com> <eric91@example.com> <eric91@example.com>
X-Mailer: Apple Mail (2.919.2)
X-Virus-Checked: Checked by ClamAV on apache.org


On Feb 25, 2008, at 1:37 PM, Marshall Pierce wrote:
>
> Should I interpret this list's continued silence on this topic as
> unwillingness to adopt my changes?
>
> -Marshall

No, I think it reflects that it isn't a "topic" but a collection of  
"topics" each of which is worthy of some debate on its own.  There was  
some initial comments on some points, but no discussions really took  
place.

I'm going to reiterate my dislike for patches that address multiple  
issues.  It make it difficult to review each change on its merits and  
if you make things difficult for other people to review your work,  
then it isn't surprising that the easiest course of action is to do  
nothing.

I'd suggesting filing bug reports for each of the "issues" in your  
patch set and then we can proceed to discussing each one on its merits.

From log4php-dev-eric91@example.com Wed Feb 27 08:04:04 2008
Return-Path: <log4php-dev-eric91@example.com>
Delivered-To: eric91@example.com
Received: (qmail 57353 invoked from network); 27 Feb 2008 08:04:04 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur.apache.org with SMTP; 27 Feb 2008 08:04:04 -0000
Received: (qmail 25038 invoked by uid 500); 27 Feb 2008 08:03:59 -0000
Delivered-To: eric91@example.com
Received: (qmail 24982 invoked by uid 500); 27 Feb 2008 08:03:59 -0000
Mailing-List: contact eric91@example.com; run by ezmlm
Precedence: bulk
list-help: <mailto:eric91@example.com>
list-unsubscribe: <mailto:eric91@example.com>
List-Post: <mailto:eric91@example.com>
Reply-To: "Log4PHP Dev" <eric91@example.com>
List-Id: <log4php-dev.logging.apache.org>
Delivered-To: mailing list eric91@example.com
Received: (qmail 24971 invoked by uid 99); 27 Feb 2008 08:03:59 -0000
Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2008 00:03:59 -0800
X-ASF-Spam-Status: No, hits=-2000.0 required=10.0
	tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155)
    by apache.org (qpsmtpd/0.29) with SMTP; Wed, 27 Feb 2008 08:03:21 +0000
Received: (qmail 57047 invoked from network); 27 Feb 2008 08:03:40 -0000
Received: from localhost (83.161.120.155)
  by localhost with SMTP; 27 Feb 2008 08:03:40 -0000
Date: Wed, 27 Feb 2008 17:03:18 +0900
From: Hiroaki Kawai <eric91@example.com>
X-Mailer: EdMax Ver5.13
MIME-Version: 1.0
To: "Log4PHP Dev" <eric91@example.com>
Subject: Re: setting ENV vars
Message-Id: <eric91@example.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
In-Reply-To: <eric91@example.com>
References: <eric91@example.com>
X-Virus-Checked: Checked by ClamAV on apache.org


Marshall Pierce <eric91@example.com> wrote:
> Hiroaki Kawai wrote:
> > Hi,
> > 
> > log4php currently supports the following environment 
> > variables (in LoggerManager.php)
> > 
> > $_ENV['log4php.defaultInitOverride']
> > $_ENV['log4php.configuration']
> > 
> > I'm wondering how people are setting this value.
> > It is very hard to set an environment value including . (dot)
> > I could set it by writing a special C code, but these vars 
> > should be set in shell.
> > 
> > And more, I wanted to add another method to set 
> > these values, $_SERVER.
> > 
> > I'd like to suggest a patch attached to this mail.
> > 
> > 
> 
> Good idea about changing the environment variable names to something
> more easily settable, but I'm curious why the config file to use would
> ever be defined in $_SERVER -- could you explain why that's useful? I
> think most httpd's will let you set environment variables.
> 
> -Marshall


$_SERVER is useful with apache httpd mod_env setting :-)
 SetEnv log4php_configuration /path/to/config-file

It is very useful setting these variables in httpd.conf rather than in
APACHE_INSTALL_DIR/bin/envvars.


--- Hiroaki Kawai



{'source': 'Apache Software Foundation Public Mail Archives'}