0 Replies Latest reply on Oct 27, 2010 5:12 PM by Franck Garcia

    Question: Weld-extension Logger in 1.0.0.Beta1

    Franck Garcia Newbie

      I use @Inject Logger logger; in my class and expect by default to have a log category representing my current full class name (this was the behaviour in version 1.0.0.Alpha2). Now my category shows org.jboss.logging.Logger instead! Is it a bug or something I should not use...Thanks,




      class Producers
      {
         
         @Produces
         Logger produceLog(InjectionPoint injectionPoint)
         {
            Annotated annotated = injectionPoint.getAnnotated();
            if (annotated.isAnnotationPresent(Category.class) && annotated.isAnnotationPresent(Suffix.class))
            {
               return getLogger(annotated.getAnnotation(Category.class).value(), annotated.getAnnotation(Suffix.class).value());
            }
            else if (annotated.isAnnotationPresent(Category.class))
            {
               return getLogger(annotated.getAnnotation(Category.class).value());
            }
            else if (annotated.isAnnotationPresent(Suffix.class))
            {
               return getLogger(getRawType(injectionPoint.getType()), annotated.getAnnotation(Suffix.class).value());
            }
            else
            {
               return getLogger(getRawType(injectionPoint.getType())); //used to be injectionPoint.getMember().getDeclaringClass()!!!
            }
         }
      ....