3 Replies Latest reply on Feb 28, 2013 11:57 AM by jamezp

    Jboss 7 logging just to started or deployed

    hamid1982

      Hi,

       

      is there a way to customize a periodic-rotating-file-handler to log the startup of ther server and to stop append the log when the server is started or the application is deployed ?

       

      Best regards.

        • 1. Re: Jboss 7 logging just to started or deployed
          jamezp

          I'm not entirely sure I'm following. Do you want the log to be cleared each time the server restarts?

           

          --

          James R. Perkins

          • 2. Re: Jboss 7 logging just to started or deployed
            hamid1982

            Hi James,

             

            Thanks for your replay. Yes , i want the log to be cleared on each server restarts.

             

            To be more precise, I want the console log to be appended in the file (e.g : startjboss.log)  until my appliaction (war, ear) is deployed. 

             

            I m have now the folowing configuration :

             

                      <periodic-rotating-file-handler name="startjboss">

                            <formatter>

                                <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                            </formatter>

                            <file relative-to="jboss.server.log.dir" path="startjboss.log"/>

                            <suffix value=""/>

                            <append value="false"/>

                        </periodic-rotating-file-handler>

             

            and i try to use this declarations

             

                      <logger category="org.jboss">

                            <level name="INFO"/>

                            <handlers>

                                <handler name="startjboss"/>

                            </handlers>

                        </logger>

             

            by adding all the packages that's appears on my eclipse console.

             

             

            I have an other question : i tried to override the name of the boot.log file into startjboss.log. i have modified the "logging.properties" file by changine the following line :

             

            handler.FILE.fileName=${org.jboss.boot.log.file:boot.log}

             

            into : handler.FILE.fileName=${org.jboss.boot.log.file:startjboss.log}

             

            I was trying to append the content of the boot log to startjboss.log but it's not working. Is there anything missing ?

             

            Best regards.

            • 3. Re: Jboss 7 logging just to started or deployed
              jamezp

              I think you need to change the start script to define a different name. Look at the end of the standalone.sh and you'll see a -Dorg.jboss.boot.log.file property being passed.

               

              --

              James R. Perkins