开发者

I already have the log file. How can I make a graph of it?

I already have log file. Now what i need is to make the graph of that log file. Is there any command line tool or google API to make graph which 开发者_如何学运维will show every transaction time.

Thank You


You can upload your file to Google Docs as a spreadsheet and then do charting & graphs out of it.


I use something like this:

java -jar perf4j-0.9.13.jar /path/to/perf4jLog.log -t 86400000 -g out.html

Note here where i use -t 86400000 which means collate the data via days. Use whatever is applicable for you.

My log4j.xml looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

    <appender name="perf4jLog" class="org.apache.log4j.DailyRollingFileAppender">
        <param value="perf4jLog.log" name="File"/>
        <param value="'.'yyyy-MM-dd" name="DatePattern"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%m%n"/>
        </layout>
    </appender>

    <logger name="org.perf4j.TimingLogger">
        <level value="INFO"/>
        <appender-ref ref="perf4jLog"/>
    </logger>

    <root>
        <priority value ="INFO"/> 
    </root>

</log4j:configuration>

Now you can open up out.html and the images should load the chart from google.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜