I need to read a remote file with logs from a tomcat

家住魔仙堡 提交于 2019-11-30 17:18:17

问题


I need to read a remote file with logs from a tomcat

What is the most convenient way to do it if I have ssh access to the log folder ?


回答1:


OtrosLogViewer can read logs from remote server. It supports SFTP, FTP and Samba. It also provides remote file systems browser.

Disclaimer: I am the author of OtrosLogViewer




回答2:


Use Editplus to connect to remote server via FTP/SSH.

Refresh the logs as and when you need to.




回答3:


You can use log4j's Chainsaw V2 and a VFSLogFilePatternReceiver to parse and tail the log file using Jakarta Commons-VFS support for ssh.

Chainsaw page: http://logging.apache.org/chainsaw/

log4j 'companions' page: http://logging.apache.org/log4j/companions/

The easiest way to get started with Chainsaw is check it out (svn) along with the extras, component and receivers 'companions', build them using maven.

Once Chainsaw is built, you can run the script in the appassembler/bin folder and configure Chainsaw with a receiver configuration that can tail the log file (see Chainsaw's Welcome tab/view example receiver configuration button for an example config file).



来源:https://stackoverflow.com/questions/2881854/i-need-to-read-a-remote-file-with-logs-from-a-tomcat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!