Hi Heri,

thanks for your advice.

Works fine :-)

Regards,
Christian


> --- Ursprüngliche Nachricht ---
> Von: "Bender Heri" <[EMAIL PROTECTED]>
> An: "Log4J Users List" <[email protected]>
> Betreff: RE: Single logfile per User and Day
> Datum: Mon, 27 Feb 2006 16:38:41 +0100
> 
> > Your solution was to implement a custom RepositorySelector, wasn't it?
> 
> Right.
> 
> > What I can't see in your solution was the place where I set 
> > the filename.
> > You've said something about getting the FileAppender?
> > 
> > Can you please explain?
> 
> I assume you configure your log4j framework through property file. 
> 
> Each configured appender and each configured logger will be instantiated
> as singleton. (This is true if you use the default RepositorySelector. If
> you provide a RepositorySelector which maintains different logger
universes,
> these singletons exists in each of these universes once. This is the base
> for supplying each of these different appenders with a separate file
name).
> 
> So you have to fetch a logger to which you have attached - in the config
> file - the desired appender, like:
> 
>     Logger logger = Logger.getLogger( loggername );
> 
> Then you call 
> 
>     DailyRollingFileAppender drfa = ( DailyRollingFileAppender )
> logger.getAppender( appendername );
> 
> And then:
> 
>     drfa.setFile( yourDesiredFileName );
>     drfa.activateOptions(); 
> 
> Heri
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to