[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-user
Subject:    Re: Conversion character for system properties?
From:       Dan Walker <walkerdan2 () attbi ! com>
Date:       2002-08-31 1:09:59
[Download RAW message or body]

Thank you and also Luc_Bell who made the same observation.  This technique 
works very well.  Also, a line in the properites file like:

	log4j.appender.A1.file=logs/${user.name}.log

works to provide a separate log file per user.

Thanks again.
-Dan

On Friday 30 August 2002 14:08, you wrote:
> Have you tried variable substitution within a layout pattern in the
> configuration file?  I tried a quick test similar to
>
>       ...ConversionPattern=[%t] %-5p %c - ${user.name} - %m%n
>
> and the value of the System Property user.name was substituted in my log
> file.
>
>
>
>
>
>                       Dan Walker
>                       <walkerdan2@attbi        To:      
> log4j-user@jakarta.apache.org .com>                    cc:
>                                                Subject:  Conversion
> character for system properties? 08/28/2002 09:55
>                       AM
>                       Please respond to
>                       "Log4J Users
>                       List"
>
>
>
>
>
>
> Hi,
> I would like to make the system property "user.name" show up in each log
> entry.  Is there a conversion character for this purpose or some other
> (easy)
> way of getting what I want?
>
> Thanks,
> Dan
>
> --
> To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org
>
> For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:  
> <mailto:log4j-user-unsubscribe@jakarta.apache.org> For additional commands,
> e-mail: <mailto:log4j-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic