As far as I remember in Java, most of the people initialize Log4J like:
public class MyClass {
static Logger logger = Logger.getLogger(MyClass.class);
}
but it is not possible in PHP.
Yes, You can.
Regards,
-Marco
> Hi,
>
> For a website I need to have a log file per user.
>
> I first looking into NDC by this make only one file with some informations (I
> test with session id).
>
> After I've try to create a file logger and change the name but that doesn't
> work. here's the code :
> --8<---
- Original Message -
From: "Suleman Butt" <[EMAIL PROTECTED]>
To:
Sent: Monday, August 14, 2006 5:56 PM
Subject: PHP Configuration Problem
> Hi,
> I'm facing a problem in using php utility (log4php) for logging. Actually I
> have downloaded it and have executed test_body.php under tests
> I want to use the %d in log4php.properties but nothing is returned :
>
> log4php.appender.fichier.layout.ConversionPattern=%d - %-5p [%F:%L] - %m%n
>
> or
>
> log4php.appender.fichier.layout.ConversionPattern=%d{Y-m-d H:i:s} - %-5p
> [%F:%L] - %m%n
>
> nether return a date in my log !
>
> I have
Hi Clay,
The LOG4PHP_LOGGER_PATTERN_MSEC_SEPARATOR can be useful.
IHMO, it's better to define it before
$GLOBALS['log4php.LoggerPatternConverter.spaces'] declaration.
with something like this:
/**
* Phpdoc comments here...
*/
if (!defined('LOG4PHP_LOGGER_PATTERN_MSEC_SEPARATOR')) {
define
- Original Message -
From: "Lst Recv" <[EMAIL PROTECTED]>
To:
Sent: Sunday, July 24, 2005 11:18 PM
Subject: Using the same config for log4php and log4perl
>I have an app that uses components written in both PHP and Perl.
>Is there anyway I can use the same log4 config file for both of
- Original Message -
From: "Lst Recv" <[EMAIL PROTECTED]>
To:
Sent: Thursday, June 23, 2005 12:15 AM
Subject: Logging the user's IP with log4php
>Is there anyway to have it include the user's IP address,
>PHPSESSIONID, URL, and filename/linenumber? These things are very
>useful - more
- Original Message -
From: "Lst Recv" <[EMAIL PROTECTED]>
To:
Sent: Thursday, June 23, 2005 12:15 AM
Subject: log4php overhead
>A key requirement of loggers is to stay out of the way when not needed
> that is, not to slow things down. Java's log4j fulfills this
> admirably.
>Unlike in
Hi Pedro,
Chainsaw now uses the new log4j.dtd that is incompatible with log4php at
present.
I've planned to modify the LoggerLayoutXml to be compatible with the new log4j
specifications.
Regards,
-Marco
- Original Message -
From: "Pedro Cristovao" <[EMAIL PROTECTED]>
To: <[EMAIL PROTE