3 Replies Latest reply on Jun 29, 2011 6:35 PM by Clebert Suconic

    logging.properties

    Clebert Suconic Master

      Does everybody have defined logging.properties within their IDEs?

       

       

      I have the logging.properties and the proper loggers defined on the default VM at my IDE, so whenever I need tracing I can just change my logging.properties.

       

       

      I'm saying that because we should all pursue adding traces (with proper log.isTraceEnabled()) to debug our own issues, and then just enable it when we're debugging it.

       

       

      If you have some difficult on setting your IDE environment ping me and we can fix it.

        • 1. Re: logging.properties
          Clebert Suconic Master

          And talking about loggers, I was having an issue that whenever I was setting Tracing, my bug was going away for say.. 1000 iterations...

           

           

          Then.. for an accident I realized the logger was using SimpleDateFormat, and I have known that SDF is a memory hog, and horrible implementation.

           

           

          I then replaced it by a simple GregorianCalendar, and I can now replicate my bug even with tracing.

           

           

           

          BTW: How stupid is this implementation of GregorianCalendar. Man.. they couldn't get any worse with it. Why they can't just have a FastDate approach with a simple milliseconds. If you look at the implementation you have all sort of objects with timezone.. etc.

           

          Now I understand why Joda Time is driving a JSR on dates.

          • 2. Re: logging.properties
            borges Novice

            Clebert Suconic wrote:

             

            Does everybody have defined logging.properties within their IDEs?

             

             

            I have the logging.properties and the proper loggers defined on the default VM at my IDE, so whenever I need tracing I can just change my logging.properties.

             

             

            I'm saying that because we should all pursue adding traces (with proper log.isTraceEnabled()) to debug our own issues, and then just enable it when we're debugging it.

             

             

            If you have some difficult on setting your IDE environment ping me and we can fix it.

             

            Hi Clebert,

             

            I think it would be a good idea to (however briefly) document that in the project's README file, or if you prefer at some other 'readme file to get hornetq developers started'.

            • 3. Re: logging.properties
              Clebert Suconic Master

              I know this is a personal preference, but I have been debugging a lot of logs recently, and I found easier If I jumped one line between each logger, especially if you had a lot of information in a single line on log traces. Example:

               

              * [Thread-0 (group:HornetQ-remoting-threads1218932998-1760388653)] 17:28:25,680 FINE [ClusterConnectionImpl]  creating record between org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0 and org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=1org.hornetq.core.server.cluster.impl.ClusterConnectionBridge [name=sf.cluster0.1acf075e-a29f-11e0-9074-c8bcc8d45c80, queue=QueueImpl[name=sf.cluster0.1acf075e-a29f-11e0-9074-c8bcc8d45c80, postOffice=PostOfficeImpl [server=HornetQServerImpl::server 0, serverUUID=1aa97dfc-a29f-11e0-9074-c8bcc8d45c80]]@5f7779e3 targetConnector=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=1], discoveryGroupConfiguration=null]]

               

               

              * [main] 17:28:25,680 FINEST [JournalFilesRepository]  Creating file hornetq-bindings-1.bindings

               

               

              * [Thread-0 (group:HornetQ-remoting-threads1246293429-2045652012)] 17:28:25,682 FINER [mbeanserver]  ObjectName = org.hornetq:module=Core,type=Queue,address="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80",name="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80"

               

               

              * [Thread-0 (group:HornetQ-remoting-threads1246293429-2045652012)] 17:28:25,682 FINER [mbeanserver]  name=org.hornetq:module=Core,type=Queue,address="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80",name="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80"

               

               

              * [Thread-0 (group:HornetQ-remoting-threads1246293429-2045652012)] 17:28:25,682 FINER [mbeanserver]  Send create notification of object org.hornetq:address="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80",module=Core,name="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80",type=Queue

               

               

              * [Thread-0 (group:HornetQ-remoting-threads1246293429-2045652012)] 17:28:25,682 FINER [mbeanserver]  JMX.mbean.registered org.hornetq:module=Core,type=Queue,address="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80",name="sf.cluster1.1ad744c0-a29f-11e0-9074-c8bcc8d45c80"

               

               

              Anyone doesn't like this format?

               

               

              I will commit it later (on my branch for now).. and if anyone dislike it it won't be a big deal to revert it.