introduce

pull log with http method.refer to:how-can-i-follow-a-file-like-tail-f-does-in-java-without-holding-the-file-open this has been use in qipeng.com 3 years,it's reliable

http server:

use

  • 1.package with package.sh. need maven2/3 ,java7
  • 2.start cmd,default port is 11456 :
java -Xms256m -Xmx512m -XX:PermSize=96m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps
-Xloggc:/home/admin/log-agent/log/agent-gc.log -XX:+HeapDumpOnOutOfMemoryError
-classpath log-agent.jar com.taovip.agent.AgentStartUp [port]