You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Todd Nine <to...@gmail.com> on 2005/03/25 15:00:13 UTC
Extending Log4j
Hi all,
I have used log4j extensively, but I would like to extend its
functionality, and I have some questions before I start. Below is
what I would like to accomplish
1. Enhance Log4j logging by adding web specific information.
2. For Instance, log methods should not have the following method parameters
.debug(HttpSession, User, Object), or debug(HttpSession, User,
Object, Throwable),
3. Extend the PatternLayout to add the following
%U = userName
%u = users id
%S = users session id string.
I have been looking at the source and extending Logger does not seem
the most appropriate, since I do not want users to have access to the
standard log4j methods. Does anyone have any ideas?
Thanks,
Todd
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: Extending Log4j
Posted by James Stauffer <st...@gmail.com>.
Using NDC or MDC may work for you.
On Fri, 25 Mar 2005 09:00:13 -0500, Todd Nine <to...@gmail.com> wrote:
> Hi all,
> I have used log4j extensively, but I would like to extend its
> functionality, and I have some questions before I start. Below is
> what I would like to accomplish
>
> 1. Enhance Log4j logging by adding web specific information.
> 2. For Instance, log methods should not have the following method parameters
> .debug(HttpSession, User, Object), or debug(HttpSession, User,
> Object, Throwable),
>
> 3. Extend the PatternLayout to add the following
> %U = userName
> %u = users id
> %S = users session id string.
>
> I have been looking at the source and extending Logger does not seem
> the most appropriate, since I do not want users to have access to the
> standard log4j methods. Does anyone have any ideas?
>
> Thanks,
> Todd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org