2 Replies Latest reply on Jun 21, 2017 11:40 AM by boris59

    Arquillian Wildfly Embedded - No logging in console etc.

    eliasbalasis1

      Using Arquillian Wildfly embedded container (9.0.1) there is no logging in neither console (stdout), log files etc.

       

      contrary to managed container

       

      but direct server side debugging is only achievable with embedded container as it runs in same JVM (managed spawns a different process)

       

      Problem remains, no logging.

       

      For convenience I am attaching a project that reproduces the problem.

       

      Please let me know your thoughts.

        • 1. Re: Arquillian Wildfly Embedded - No logging in console etc.
          eliasbalasis1

          Resolved by adding adjusted JVM argument from main startup script (standalone.bat / standalone.sh)

           

          "-Dlogging.configuration=file:%JBOSS_CONFIG_DIR%/logging.properties" ^

           

           

          -Djava.util.logging.manager=org.jboss.logmanager.LogManager is always required for embedded container, it doesn't start otherwise.

          JBoss Logging Manager needs to be configured before start though using -Dlogging.configuration

          1 of 1 people found this helpful
          • 2. Re: Arquillian Wildfly Embedded - No logging in console etc.
            boris59

            Thanks, this helped a lot!

             

            One minor addition: The file "%JBOSS_CONFIG_DIR%/logging.properties" is usually generated by Wildfly standalone during startup, based on the information configured within "%JBOSS_CONFIG_DIR%/standalone[-full].xml". Since access to the config file specified may preceed the generation of this file (as was the case for me when letting Maven's failsafe-plugin start Wildfly Embedded) it might not get picked up at all. I worked around this (a bit hackish...) by

            • copying a generated version of "logging.properties" into src/test/resources
            • letting the location of "server.log" get injected via Maven resource plugin's filtering option
            • specify the filtered "logging.properties" via failsafe plugin as described above.

             

            That way all log entries were going into server.log from the beginning, including Wildfly's startup logging.