I've been going through the Excalibur Logger package (mainly the stuff then Berin refactored (api, and related impls - jdk, log4j, logkit) and I started work on a logging system factory based on the avalon-repository package bootstrap services.


I'm now at the point where my conclusion is that we should be using the avalon-repository classloader and factory services as the basis for loading targets via factories. This would imply some substantial refactoring of content in Excalibur Logger and elimination of classes such as DefaultLogTargetFactoryManager.

The approach I'm thinking about is that each target factory would be created by the avalon-repository package based on classloader meta - so for example, the SMTPTargetFactory would derive from Factory, have its own associated meta data concerning dependencies, expose its own creation criteria, and would be deployed automatically on demand in its own classloader buy a LogKitLoggingManager, itself created by a LoggingManagerFactory.

Upside of this approach is the only dependency a system would have would be the avalon-repository-main package. Using this package a client application boots a logging solution of choice. The logging solution then uses the repository package to bootstrap factories based on configurations.

This means that the excalibur-logging overhead would drop to about 50k, any logging system implementation dependencies would be resolved automatically, and new logging system and targets could be added independently of the package.

The downside is that this would involve a much deeper separation in terms of sub-projects within the logging project. In particular, each target type would constitute a separate maven project. Secondly, the changes would not be backward compatible (but this should not be a big problem as the logging facility is a container side concern).

The initial experiments on this are currently sitting inside the merlin package (not committed) - but my thinking is that this is something that should be usable at a general level. I think it would be better to start something separate in sandbox under the o.a.a.logging package name. First step would be to get a simple working example in place of a logging system created by avalon-repository, and that system creating a simple file target from a factory created using avalon-repository factory services.

Thoughts?

Stephen.

--

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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



Reply via email to