On Tue, May 15, 2012 at 8:11 PM, Michael Sole <ms...@gold-mobile.com> wrote:
> Christian,
>
> As I mentioned before I switched from using the log4php as a subfolder to 
> having it be a pear extension but I am getting a class not found unless I 
> purposefully include that path in my script. Should it load automatically?

I am not a pear expert, but my expectation is it should load
automatically. Can you show us your folder structure?

Cheers

> Mike
>
> -----Original Message-----
> From: Christian Grobmeier [mailto:grobme...@gmail.com]
> Sent: Tuesday, May 15, 2012 1:51 PM
> To: Log4PHP User
> Subject: Re: Convert to array from XML
>
> On Tue, May 15, 2012 at 7:34 PM, Michael Sole <ms...@gold-mobile.com> wrote:
>> We are using log4php quite extensively in our application. We began by
>> using the XML config file but found that too much of a hassle as we
>> end up with lots of them. The array method of configuring loggers
>> seems much more efficient but I am having difficulty converting our
>> xml file to the array. I am sadly not able to find a good enough
>> example to use as a template. Can someone please help me by converting this 
>> XML into an array?
>
> Have you seen that for each component is an example for xml and php
> (array) available?
> F.e. http://logging.apache.org/log4php/docs/appenders/rolling-file.html
>
> A quick start for php configuration:
> http://logging.apache.org/log4php/docs/configuration.html
>
> HTH
> Christian
>
>>
>>
>>
>> <log4php:configuration
>> xmlns:log4php="http://logging.apache.org/log4php/";>
>>
>>     <appender name="myAppender" class="LoggerAppenderDailyFile">
>>
>>                 <layout class="LoggerLayoutTTCC" />
>>
>>     <param name="datePattern" value="Y-m-d" />
>>
>>         <param name="file"
>> value="/var/www/virtual/derver.net/michael/htdocs/log/michaeldev%s.log
>> " />
>>
>>     </appender>
>>
>>                 <appender name="myAppender"
>> class="LoggerAppenderEcho">
>>
>>     <layout class="LoggerLayoutTTCC" />
>>
>> </appender>
>>
>>     <root>
>>
>>         <level value="WARN" />
>>
>>         <appender_ref ref="myAppender" />
>>
>>     </root>
>>
>> </log4php:configuration>
>>
>>
>>
>> Also, I have had trouble (in the past) with relative paths in the XML,
>> I assume the array method won’t have these issues?
>>
>> _______________
>>
>> Michael F. Sole
>> ms...@gold-mobile.com
>>
>> Office: 732.632.8801, ext. 261
>> Mobile: 516.592.3683
>>
>> Fax: 732.632.3599
>>
>> Gold Mobile
>> www.gold-mobile.com
>>
>> Mobile Health Tech Group
>> www.mobilehealthtech.md
>>
>> This e-mail and any files transmitted are intended solely for the use
>> of the individual or entity to whom they are addressed, and for the
>> use of Gold Mobile.  Any other use is strictly prohibited.
>>
>>
>
>
>
> --
> http://www.grobmeier.de
> https://www.timeandbill.de



-- 
http://www.grobmeier.de
https://www.timeandbill.de

Reply via email to