Byte Code Engineering

Over a long period, it's become clear that no matter how complex and sophisticated commons logging discovery code becomes, it cannot satisfy every need. For example, a framework may require a specific configuration to ensure that components feed logging back into it's framework.

There are also some use cases where the environment cannot be controlled so that configuration information can be reliably fed into commons logging. For example, a self-contained EJB application where the deployer has insufficient control over the container it will be deployed to or an applet.

Alternative configuration solutions are required to address these use cases.

It should be possible to use byte code engineering to hard wire the configuration directly in the classes: bypassing the configuration and discovery code. Each call to Logger.getLog() would be modified to call a specific implementation.


Up to Logging

  • No labels