6 Replies Latest reply on Apr 14, 2008 10:22 AM by Pete Muir

    How to get @Logger during @Startup?

    Brom bie Newbie

      Hi all,


      How do I get the Logger object during a Startup?


      For example:


      @Scope(ScopeType.APPLICATION)
      @Name("doStuff")
      @Startup
      public class DoStuff{
         @Logger Log log;
         public void startup(Component component) {
            log.info("Hi there");
         }
      }



      will throw a NullPointerException since log is null.  Adding depends on the Log object doesn't help.


      This was mentioned here but no solutions were offered.


      Thanks for the help!