hi,
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:
------------------
<?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..
?>
-------------------------------------
i am on Linux using Apache and mysql. the configuration above was supposed
to
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..
and also, Im kind of confused, whats the difference between the:
1) apache-log4php-2.0.0-incubating
2) log4php-0.9
log4php installers? and which one should I be using?
currently, with the config above i am on log4php-0.9..
thanks a lot.
tinks :(
--
View this message in context:
http://old.nabble.com/log4php-problem-tp30442440p30442440.html
Sent from the Log4php - Dev mailing list archive at Nabble.com.