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

python - RuntimeError: can't re-enter readline -

python - PyInstaller UAC not working in onefile mode -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -