I've tried to create an easy per deployment logging possibility without many fuss with package prefixes / repository selectors / TCLFilter etc.
This service will look for a log4j.xml or .prop in the META-INF directory of all deployments, and create and register the logger for the deployment.
I'm almost finished, but one part is missing: Web deployments does not publish the context loader before 'start' step, but the classes (and loggers) are created in the 'create' step.
Basically this means I cannot identify the deploymentinfo from the thread's classloader. Is there a reason why the context loader only set at the end of create into the webmetadata?
Or is it a way around this 'limitation'?
You can have a look at my code at: hxxp://184.108.40.206/jboss/
Any help welcome!
I think I was too quick posting my quertion. I've found a workaround to the problem, since the UCL (which is the parent of the web classloader) is known at that time, so I could identify the web classloader with it.