i am new with php and hope that you guys could help me with my prob.
i am working on the logging for my work.
i wanted to use log4php.
I copied this configuration online, and named the file
log4php.properties
----------------------
log4php.rootLogger=INFO, LOGFILE
log4php.appender.LOGFILE=LoggerAppenderFile
log4php.appender.LOGFILE.name="test.log"
log4php.appender.LOGFILE.layout=LoggerPatternLayout
log4php.appender.LOGFILE.layout.ConversionPattern="%d{Y-m-d H:i:s} %F %p %m %n"
----------------------
in my php code i have:
--------------------
Code: Select all
<?php
include 'opendb.php';
require_once '../log4php/LoggerManager.php';
require_once '../log4php/LoggerPropertyConfigurator.php';
$ID = $_GET['info'];
$result = mysql_query("SELECT * FROM userTable WHERE IDname='" . $ID . "'");
$rnum=mysql_num_rows($result);
echo "alert(\"" . $rnum . "\");";
$logger =& LoggerManager::getRootLogger();
$logger->info($_SERVER['REMOTE_ADDR']);
$logger->info("tesing123");
...some php codes..
?>create a file for the log. however, it cannot create a file. i've been searching
pretty hard on this and tried several config examples but still i could not
get it to write to a log file..
is there something that i forgot to do?
please help..
thanks alot.
tinks