RailsLogVisualizer meets Apollo. 13

Posted by Daniel Wanja Thu, 29 Mar 2007 05:03:30 GMT

20070328RailsLogVisualizerLogo.gifIt’s not complete yet, but for the curious out there, here is a first and “ruff” version of the RailsLogVisualizer as a pure Apollo application. The previous version was an OSX application that was embedding a Ruby http server that was used to load the Rails log files, as a Flex application didn’t provide a mean to load files directly. Here comes Apollo and lifts that restriction. So I thought…let’s try to rewrite the file loading in Actionscript. Well this is my first attempt, during the port I broke a couple of features that will need more attention in the future. Also I haven’t tried to load any file bigger than 40Mb. And I haven’t implemeted the incremental loading of large files that I had with the Ruby version. Also the keyboard navigation isn’t working…so just use the mouse for now. That’s the next thing I’ll need to fix. Let me know what you find at daniel@onrails.org or just add some comments on this entry.

Things that broke during the port:
  • Hourly breakdown of daily request.
  • Breakdown ofHttp methods (Get, post, delete, head).
Things I’ll need to add next:
  • Improve progress indicator during file load and data parsing.
  • Refactor interaction to allow keyboard support (basically rewrite using Cairngorm).
  • Improve the File Browser.
  • Support for RESTFull controllers (detect _method parameters (i.e. ?_method=put)).
  • Add chart of action over time.

How to install:

1) If you haven’t yet downloaded the Apollo Runtime, get it here: Apollo runtime (8Mb).

2) Download the Rails Log Visualizer: RailsLogVisualizer0.4.air (480Kb) (right click and ‘Download Linked File’). On a side note don’t click directly as the mime type on this server for .air files is not yet set. For more info see Mike Chambers entry on the subject.

3) Follow the installation steps that Apollo provides. It’s a little strange at first as they have a custom installer.

Comments

Leave a response

  1. Don Parish Thu, 29 Mar 2007 13:40:19 GMT

    Thanks. I just got my first production app at work up, and had tried to use the previous Rails Log Visualizer without success on my Win XP box at work or my trusty iBook at home. I’ll let you know how it goes.

  2. Don Parish Thu, 29 Mar 2007 18:54:45 GMT

    It works pretty much as advertised. It had some problems reading all of my logs. Also, not all of the graphs for requests by hours were correct, as you had mentioned. Overall pretty nice. Thanks.

    This was my first introduction to Apollo. Not bad!

  3. Daniel Wanja Thu, 29 Mar 2007 19:02:33 GMT

    Cool. What was the problem reading all of your logs? What’s the size of your log file?

  4. Don Parish Mon, 02 Apr 2007 17:10:48 GMT

    Size isn’t an issue, these are small files (biggest is 635k). Seemed to have more problems with production files versus dev logs. Test log seems okay. This is the error message it throws:

    TypeError: Error #1010: A term is undefined and has no properties. at org.onrails.railsloganalyzer::DataAggregator/time_year_month_day() at TimeView/selectDay() at TimeView/setCurrentTime() at LogViewer/initializeData() at RailsLogVisualizer/analyze() at RailsLogVisualizer/fileLoaded() at RailsLogVisualizer/__fileLoader_fileLoadedAndParsed() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-26332\EventDispatcher.as:184] at mx.core::UIComponent/dispatchEvent() at LoadFile/preagregate() at LoadFile/::fileLoaded()

    Using Rails 1.2.3. I do have caching turned on.

  5. Daniel Wanja Mon, 02 Apr 2007 17:18:44 GMT

    Hi Don,

    If your log file doesn’t contain any confidential data, could you send it to daniel [at] onrails.org. I will then contact you via email and debug and fix the issue. I tried the log analyzer on logs from several applications (mainly production logs) but it’s always good to have different source. Thanks.

  6. Don Parish Mon, 02 Apr 2007 19:38:10 GMT

    Size isn’t an issue, these are small files (biggest is 635k). Seemed to have more problems with production files versus dev logs. Test log seems okay. This is the error message it throws:

    TypeError: Error #1010: A term is undefined and has no properties. at org.onrails.railsloganalyzer::DataAggregator/time_year_month_day() at TimeView/selectDay() at TimeView/setCurrentTime() at LogViewer/initializeData() at RailsLogVisualizer/analyze() at RailsLogVisualizer/fileLoaded() at RailsLogVisualizer/__fileLoader_fileLoadedAndParsed() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent()[C:\Documents and Settings\acrorel\Local Settings\Temp\aslibc-26332\EventDispatcher.as:184] at mx.core::UIComponent/dispatchEvent() at LoadFile/preagregate() at LoadFile/::fileLoaded()

    Using Rails 1.2.3. I do have caching turned on.

  7. olivier Hericord Mon, 02 Apr 2007 22:22:03 GMT

    can’t get it to be an appolo app…it’s just a folder :)

  8. Daniel Wanja Mon, 02 Apr 2007 22:53:15 GMT

    Hi Oliver,

    It may be downloaded as RailsLogVisualizer0.4.air.zip file. Simply rename it as RailsLogVisualizer0.4.air it should then be recognized by Apollo. An .air file is really just a .zip file named differently. Hope this helps.

  9. Ben Tue, 03 Apr 2007 21:37:43 GMT

    Daniel, sounds promising… Though am unable to use it. Any plans to mke it work the the Rails syslog logger? http://rails-analyzer.rubyforge.org/hacks/

  10. olivier Hericord Thu, 05 Apr 2007 06:38:34 GMT

    thanks daniel it works great

  11. Senthil Nayagam Fri, 13 Jul 2007 07:20:38 GMT

    I just tried it now.

    AIR is complaining that the version is not compatible with current runtime(beta b1_win_061107).

    do you have a later version available?

    Senthil

  12. Senthil Nayagam Fri, 13 Jul 2007 07:21:54 GMT

    sorry didnt see you have already released a new version.

    thanks

    :)

Comments