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.

Reply via email to