You are right, the echo statement isn't code good.  BUt it works.  I have
changed it though and it doesn't make a difference.  I am currently going
through the log4php code to see if I can spot the problem.

Any other ideas?


Christian grobmeier wrote:
> 
> Hi
> 
> did you realize you pasted:
> echo Hello World;
> 
> while it should be
> echo "Hello World";
> 
> Can you check if this is truth?
> 
> Cheers
> 
> 
> On Mon, Jul 25, 2011 at 5:49 PM, krazykev <k.mel...@theiet.org> wrote:
>>
>> Thanks Christian,
>>
>> nice ideas but no luck.  The changes to the config file made no
>> difference.
>> And the error reporting line doesn't add any errors to stdout (or should
>> I
>> be looking elsewhere)?
>> Kev
>>
>>
>> Christian grobmeier wrote:
>>>
>>> Hey Kev,
>>>
>>> did you try this:
>>>
>>> <appender name="myAppender" class="LoggerAppenderFile">
>>>     <layout class="LoggerLayoutSimple" />
>>>
>>>
>>> </appender>
>>>
>>> Replace file value with your log location. Maybe its some configuration
>>> missing.
>>>
>>> And you can try to call this in the first line of your script:
>>>
>>> error_reporting(E_ALL);
>>>
>>> This should bring up any errors, if any.
>>>
>>> Let me know what the outcome is
>>> Cheers
>>> Christian
>>>
>>> On Mon, Jul 25, 2011 at 1:27 PM, krazykev <k.mel...@theiet.org> wrote:
>>>>
>>>> I hope someone can help me with this - I'm baffled.  New to log4php,
>>>> not
>>>> new
>>>> to log4net or software development/administration.
>>>>
>>>> I am trying to use log4php to write to a file.  My php file is just
>>>> like
>>>> the
>>>> tutorial.
>>>>
>>>> <?php
>>>> include('src/main/php/Logger.php');
>>>> Logger::configure('src/main/php/log4php.xml');
>>>> $log = Logger::getLogger('myLogger');
>>>>
>>>> // Start logging
>>>> $log->trace("My first message.");   // Not logged because TRACE < WARN
>>>> $log->debug("My second message.");  // Not logged because DEBUG < WARN
>>>> $log->info("My third message.");    // Not logged because INFO < WARN
>>>> $log->warn("My fourth message.");   // Logged because WARN >= WARN
>>>> $log->error("My fifth message.");   // Logged because ERROR >= WARN
>>>> $log->fatal("My sixth message.");   // Logged because FATAL >= WARN
>>>>
>>>> echo Hello World;
>>>> ?>
>>>>
>>>> If I use this log4php.xml file, it works perfectly and I get STDOUT
>>>> twice.
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <log4php:configuration
>>>> xmlns:log4php="http://logging.apache.org/log4php/";>
>>>>
>>>>    <appender name="default" class="LoggerAppenderConsole">
>>>>
>>>>    </appender>
>>>>
>>>>    <appender name="default2" class="LoggerAppenderConsole">
>>>>
>>>>    </appender>
>>>>
>>>>    <root>
>>>>        <appender_ref ref="default" />
>>>>        <appender_ref ref="default2" />
>>>>    </root>
>>>> </log4php:configuration>
>>>>
>>>>
>>>> BUT.... if I add this
>>>>
>>>>    <appender name="myAppender" class="LoggerAppenderFile">
>>>>
>>>>    </appender>
>>>>
>>>> I just get "Hello world" on STDOUT.  All appenders stop working.  I
>>>> have
>>>> tried different file paths and have set the file permissions to full
>>>> access
>>>> for everyone so I am stumped.  How can I see what log4php is doing?
>>>>
>>>> I am using PHP 5.3 and IIS 7.
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> Thanks
>>>>
>>>> Kev
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/LoggerAppenderFile-on-Windows-tp32130920p32130920.html
>>>> Sent from the Log4php - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.grobmeier.de
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/LoggerAppenderFile-on-Windows-tp32130920p32132930.html
>> Sent from the Log4php - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> http://www.grobmeier.de
> 
> 

-- 
View this message in context: 
http://old.nabble.com/LoggerAppenderFile-on-Windows-tp32130920p32133042.html
Sent from the Log4php - Users mailing list archive at Nabble.com.

Reply via email to