On Sat, 11 Aug 2001 05:21, giacomo wrote:
> On Fri, 10 Aug 2001, giacomo wrote:
>
> Ok, lets summarize:
>
> The goal:
>
>       Enable configurability of the Logger a Component
>       will receive by the ComponentMananger.
>
> Proposed is a magic attribute logger (same approach take for the
> pool-min, pool-max attributes to Poolable Components) that references
> the logger to use:
>
>    <component role="MyComp" class="..." logger="file"/>
>
> A possible solution seems to be a similar approach take for the roles
> definitions (RoleManager).

sounds good.

> So the LogKit configuration file (see proposals below) will be fed into
> a LogKitManager (Configurable). This LogKitManager creates the
> Categories, LogTargets, and Filters. To enable the specified
> LogTargetFactories to create LogTargets like ServletLogTarget a Context
> object might be needed so the LogKitManager must and the
> LogTargetFactories could be Contextualizable. All classes mentioned so
> far will be Loggable to report failures during setup. The Logger will be
> the one passed in by the client class as usual (probabbly the root
> logger).

Personally I would separate it into two classes, a LogManager and a 
LogConfigurator. The LogManager will contain mapping of name to specific log 
components (ie a map between name and logTarget, another map between name and 
formatter). It would also contain reference to hierarchy.

The LogConfigurator will read a config source and manage the factorys. It 
will inject all the log components created into manager. It would also 
perform mapping between Loggers and priority/logtargets as necessary.

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

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

Reply via email to