[email protected]
[Top] [All Lists]

LoggerPatternLayout %t resolves to PID

Subject: LoggerPatternLayout %t resolves to PID
From: Christian Hammers
Date: Tue, 10 Jul 2007 02:01:28 +0200
Hello

I found it somewhat confusing that %t gets substituted by the PID and not
the name of the current thread. I had expected $_SERVER['PHP_SELF']. Why is
this?

Currently I see no way to set the application name although sometimes
it could be useful to log several tools belonging to the same application
into one big file.
I.e. I want to generate a logfile called "accounting.errors" that contains
messages from several accounting tools:
        accounting-data-import.php[1220]: info: imported this and that
        accounting-calculate.php[1230]: warning: something happened
        accounting-calculate.php[1230]: info: some more text
        accounting-mailer.php[1234]: error: IP '1.2.3.x' is invalid

I cannot use categories before the PID as e.g. the last line could have
been produced by an exemplary class "org.apache.validator" and then %c
would only print a rather meaningless: "org.apache.validator[1234] ...".

So is %t buggy and do you have any ideas regarding my multi-application
logfile?

bye,

-christian-

<Prev in Thread] Current Thread [Next in Thread>