How can I access tomcat log files from Java web application deployed on it? -


how can access tomcat log files java web application deployed on it? possible?

okay, possible. used like:

    public static string readlogfile () {         stringbuilder sb = new stringbuilder();         try(bufferedreader br = new bufferedreader(new filereader("/var/log/tomcat8/catalina.out"))) {                       string line = br.readline();             while (line != null) {                 sb.append(line);                 sb.append(system.lineseparator());                 line = br.readline();             }         } catch (ioexception e) {                        // exception handling         }         return sb.tostring();     } 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -