2 Replies Latest reply on Dec 25, 2008 4:48 AM by roberto roberto

    How to read server.log/boot.log ?

    roberto roberto Novice

      I want to integrate in my j2ee application a console to read the jboss server.log and/or boot.log (jboss 4.x and 5.x).
      How can I implement it ?
      there is same example around ?
      using JMX or directly jboss API....
      I haven't found something like this in the jmx and web console
      thanks

        • 1. Re: How to read server.log/boot.log ?
          Peter Johnson Master

          You can open the file as a read-only file stream. Or were you looking for something else?

          I once had a servlet that opened the log files as read-only text streams and then displayed the last 100 or so lines to the user and let the user navigate through the log file.

          • 2. Re: How to read server.log/boot.log ?
            roberto roberto Novice

            Hi Peter (and Merry Xmas!) and Thank you for you reply.

            I prefer to don't open directly myself log file.
            I prefer to call some jboss API in order to obtain log information.

            Open directly log file I need to know where log files are located, rollover policy and so on.

            But if this is the only way to have it, no problem.
            I prefer also to have a JMX or something like it because in the future I would like to build this log console inside my ear application connected to JBoss or WebSphere or NetWeaver ..... Maybe having a JMX can be more simple to implemement the right adapter