4 Replies Latest reply on Sep 27, 2012 11:12 AM by Clebert Suconic

    Per class logging / tracing

    Clebert Suconic Master

      Isn't there a way we can get back to log/tracing at class levels?  I really used this feature when debugging before, and I would rather use System.outs than this logging... so... is there any way we can improve it?



      I'm a bit confused on how to configure logging on master anyways... I would like to disable everything.



      @Andy: can you gives some idea?


      I guess it would be nice to add it to the Readme

        • 1. Re: Per class logging / tracing
          Andy Taylor Master

          so you cant do class level logging, you would have to add more loggers if you want finer grained logging.


          to configure logging you need the following:


          1) set the logging.configuration sys prop to point to a logging.properties


          2) set the log manager to jboss java.util.logging.manager=org.jboss.logmanager.LogManager


          the logging.properties needs the follwoing line, firstly configure the loggers you want




          note the root logger is always configured


          then set the level you want on each logger, so




          then configure the handlers, so


          handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler


          # Console handler configuration







          # File handler configuration








          # Formatter pattern configuration



          formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n


          thats it really

          • 2. Re: Per class logging / tracing
            Clebert Suconic Master

            I have talked to jamezp and smarlow on #jboss-as7.



            We should be doing Logger.getLogger for tracing level logging.


            We keep just package names and the way we are doing now...  but for tracing, we should get a separate Logger on the class and log to that class instead.

            • 3. Re: Per class logging / tracing
              Andy Taylor Master

              that means we will have 2 loggers per class, seems wrong.

              • 4. Re: Per class logging / tracing
                Clebert Suconic Master

                Well... the other Logger doesn't belong to the class... that means we will have either 0 (when only using the generic logger) or 1.


                there are other projects doing it this way.