2 Replies Latest reply on Nov 18, 2004 5:19 PM by starksm64

    Get instance of logging service.

      How would I go about to get an instance of the logger thats is configured as a service in Jboss?

      Am writting my own Service and would like to use the logging built in to Jboss

      Thanks

        • 1. Re: Get instance of logging service.

          Or more specifically how can I access a particualr service (Jboss MBeans) from my own services.

          Thanks

          • 2. Re: Get instance of logging service.
            starksm64

            The logging service just configures the logging subsystem which is log4j by default so you would simply use whatever factory method the configured logging subsystem provides. The logging service itself has no logging facilities.

            import org.apache.log4j.Logger;
            
            ....
            
             Logger log = Logger.getLogger("x.y.z.MyCategory");
            


            or use the jboss logging wrapper which is independent of the logging subsystem:

            import org.jboss.logging.Logger;
            
            ....
            
             Logger log = Logger.getLogger("x.y.z.MyCategory");