5 Replies Latest reply on Aug 21, 2012 6:44 AM by Michael Justin

    HornetQ-2.3.0.Alpha logging on Windows generates no output

    Michael Justin Novice

      Hello,

       

      with the current download version and also with a fresh compiled version, starting on Windows (Vista 32 Bit) shows this error:

       

      Bad level value for property: handler.CONSOLE.level

      Bad level value for property: handler.FILE.level

       

       

      And no log entries appear on console and in the logs directory.

       

      The error messages disappear if I modify the configuration in logging.properties and set

       

      handler.CONSOLE.level=DEBUG

      ...

      handler.FILE.level=DEBUG

       

      to INFO instead of DEBUG.

       

      p.s. I verified on Ubunto 12.04 that version 2.3.0.Alpha logging works there as expected.

        • 2. Re: HornetQ-2.3.0.Alpha logging on Windows generates no output
          Michael Justin Novice

          This is the properties file (config\stand-alone\non-clustered\logging.properties):

           

          #

          # JBoss, Home of Professional Open Source.

          # Copyright 2010, Red Hat, Inc., and individual contributors

          # as indicated by the @author tags. See the copyright.txt file in the

          # distribution for a full listing of individual contributors.

          #

          # This is free software; you can redistribute it and/or modify it

          # under the terms of the GNU Lesser General Public License as

          # published by the Free Software Foundation; either version 2.1 of

          # the License, or (at your option) any later version.

          #

          # This software is distributed in the hope that it will be useful,

          # but WITHOUT ANY WARRANTY; without even the implied warranty of

          # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

          # Lesser General Public License for more details.

          #

          # You should have received a copy of the GNU Lesser General Public

          # License along with this software; if not, write to the Free

          # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA

          # 02110-1301 USA, or see the FSF site: http://www.fsf.org.

          #

           

          # Additional logger names to configure (root logger is always configured)

          # Root logger option

          loggers=org.jboss.logging,org.hornetq.core.server,org.hornetq.utils,org.hornetq.journal,org.hornetq.jms,org.hornetq.integration.bootstrap

           

          # Root logger level

          logger.level=INFO

          # HornetQ logger levels

          logger.org.hornetq.core.server.level=INFO

          logger.org.hornetq.journal.level=INFO

          logger.org.hornetq.utils.level=INFO

          logger.org.hornetq.jms.level=INFO

          logger.org.hornetq.integration.bootstrap.level=INFO

          # Root logger handlers

          logger.handlers=FILE,CONSOLE

           

          # Console handler configuration

          handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler

          handler.CONSOLE.properties=autoFlush

          handler.CONSOLE.level=DEBUG

          handler.CONSOLE.autoFlush=true

          handler.CONSOLE.formatter=PATTERN

           

          # File handler configuration

          handler.FILE=org.jboss.logmanager.handlers.FileHandler

          handler.FILE.level=DEBUG

          handler.FILE.properties=autoFlush,fileName

          handler.FILE.autoFlush=true

          handler.FILE.fileName=logs/hornetq.log

          handler.FILE.formatter=PATTERN

           

          # Formatter pattern configuration

          formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter

          formatter.PATTERN.properties=pattern

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

           

          I only unpack the hornetq-2.3.0Alpha zip and start the broker.

           

          Nothing but this appears on the console:

           

          ********************************************************************************

          ***

          "java  -XX:+UseParallelGC  -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Xms5

          12M -Xmx1024M -Dhornetq.config.dir=..\config\stand-alone\non-clustered  -Djava.u

          til.logging.config.file=..\config\stand-alone\non-clustered\logging.properties -

          Djava.library.path=. -classpath ..\config\stand-alone\non-clustered;..\schemas\;

          C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-bootstrap.jar;C:\Java\hornetq-2.3.0.Alph

          a\lib\hornetq-commons.jar;C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-core-client.ja

          r;C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-core.jar;C:\Java\hornetq-2.3.0.Alpha\l

          ib\hornetq-jboss-as-integration.jar;C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-jms-

          client.jar;C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-jms.jar;C:\Java\hornetq-2.3.0

          .Alpha\lib\hornetq-journal.jar;C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-rest.jar;

          C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-service-sar.jar;C:\Java\hornetq-2.3.0.Al

          pha\lib\hornetq-spring-integration.jar;C:\Java\hornetq-2.3.0.Alpha\lib\hornetq-t

          witter-integration.jar;C:\Java\hornetq-2.3.0.Alpha\lib\jboss-jms-api.jar;C:\Java

          \hornetq-2.3.0.Alpha\lib\jboss-mc.jar;C:\Java\hornetq-2.3.0.Alpha\lib\jnp-client

          .jar;C:\Java\hornetq-2.3.0.Alpha\lib\jnpserver.jar;C:\Java\hornetq-2.3.0.Alpha\l

          ib\netty.jar org.hornetq.integration.bootstrap.HornetQBootstrapServer hornetq-be

          ans.xml"

          ********************************************************************************

          ***

          Bad level value for property: handler.CONSOLE.level

          Bad level value for property: handler.FILE.level

           

          and there is no log file in the logs directory.

           

          If I modify the file and set the logger level to INFO instead of DEBUG the "Bad level" messages disappear so I think I am editing the right configuration file.

           

          Using JConsole I can see the JMX MBeans of HornetQ and the java.util.logging loggers.

           

          Is the logging configuration compatible with earlier versions? I see that in HornetQ 2.2.14 the default logging configuration is much shorter.

           

          p.s. I copied the original 2.2.14 logging.properties over the 2.3.0.Alpha release logging.properties and it works now.

           

           

           

          ############################################################

          #      Default Logging Configuration File

          #

          # You can use a different file by specifying a filename

          # with the java.util.logging.config.file system property.

          # For example java -Djava.util.logging.config.file=myfile

          ############################################################

           

          ############################################################

          #      Global properties

          ############################################################

           

          # "handlers" specifies a comma separated list of log Handler

          # classes.  These handlers will be installed during VM startup.

          # Note that these classes must be on the system classpath.

          # By default we only configure a ConsoleHandler, which will only

          # show messages at the INFO and above levels.

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

          java.util.logging.ConsoleHandler.formatter=org.hornetq.integration.logging.HornetQLoggerFormatter

          java.util.logging.FileHandler.level=INFO

          java.util.logging.FileHandler.formatter=org.hornetq.integration.logging.HornetQLoggerFormatter

          java.util.logging.FileHandler.pattern=../logs/hornetq.log

          # Default global logging level.

          # This specifies which kinds of events are logged across

          # all loggers.  For any given facility this global level

          # can be overriden by a facility specific level

          # Note that the ConsoleHandler also has a separate level

          # setting to limit messages printed to the console.

          .level= INFO

           

          ############################################################

          # Handler specific properties.

          # Describes specific configuration info for Handlers.

          ############################################################

          • 3. Re: HornetQ-2.3.0.Alpha logging on Windows generates no output
            Clebert Suconic Master

            Thanks...

             

             

            I asked Andy Taylor to take a look on it... as he did the integration of logging on 2.3.0

            • 4. Re: HornetQ-2.3.0.Alpha logging on Windows generates no output
              Andy Taylor Master

              there is an issue with both startuip scripts which I have now fixed in master, Michael if you could update the run scripts from https://github.com/hornetq/hornetq/commit/59ea862c44c16fc61e4a8f8ec5f341c2a18a62bf then all should be fine.

              • 5. Re: HornetQ-2.3.0.Alpha logging on Windows generates no output
                Michael Justin Novice

                Yes, everything is fine with this fixed starte up script. Many thanks!