2 Replies Latest reply on Oct 2, 2007 7:56 AM by chris.w

    How can I (remotely) access the log files?


      I'm currently developing a web application that reads all kinds of information from a (remote) JBoss server via the JMX remoting interface, such as statistical information for all deployed EJBs.
      For this application I have to provide some means to download or view the remote JBoss server's log files. Is there any easy way to achieve this?

      So far I've only found the MBean "jboss.system:type=ServerConfig" which has an attribute "ServerLogDir" of the type java.io.File, but that doesn't do me any good when I'm accessing the MBean server from another machine.

        • 1. Re: How can I (remotely) access the log files?

          I don't believe there is any way to access the logs remotely. Your best bet is to use something like Log4J Chainsaw or create your own MBean (or Servlet) that probes the file system.

          • 2. Re: How can I (remotely) access the log files?

            Thanks for your reply.
            Well, when I think about it, in a production environment my application would actually run on the same machine or even the same JBoss server, so probing the local file system would be the most simple solution.
            However, I still need the URL of the (local) log directory, but curiously, the above mentioned ServerConfig MBean doesn't have a "ServerLogDir" attribute on my local JBoss server, only on the remote one that I'm testing with. Very strange ...