2016/02/07 - Apache Onami has been retired.

For more information, please explore the Attic.

Introduction

Apache Onami Logging is a small, light and fast logger Injector, built on top of Google-Guice, for the well known frameworks:

  • Apache log4j 2;
  • Apache log4j;
  • Apache commons-logging;
  • Java Utils Logging;
  • Simple Logging Facade for Java slf4j.

    The concept behind Onami Logging is that instead of creating Loggers by hand, users can let Guice creates and injects them automagically, for example instead writing:

    import java.util.logging.Logger;
    ...
    Logger logger = Logger.getLogger( getClass().getName() );
    ...

    users can easily code:

    import java.util.logging.Logger;
    ...
    @InjectLogger
    Logger logger;
    ...

    and nothing more! No setter methods are needed, just declare it, annotate with @InjectLogger annotation let Onami Logging doing the rest, final and already set Loggers will be skipped and Onami Logging won't try to override them at all.