Giter VIP home page Giter VIP logo

Comments (6)

barttenbrinke avatar barttenbrinke commented on August 20, 2024

What do you want to have speced? That they actually parse these filetypes?

from request-log-analyzer.

wvanbergen avatar wvanbergen commented on August 20, 2024

For example, you can do this:

class MyFileFormat < RequestLogAnalyzer::FileFormat::Rails

  # Add some additional lines here besides the standard Rails lines
  # Also, add some trackers to the report.

  # Hack the request class
  class Request < RequestLogAnalyzer::FileFormat::Rails::Request
    # hack the request class here
  end
end

See http://wiki.github.com/wvanbergen/request-log-analyzer/creating-your-own-file-format-definition for more information. This should behave as expected and currently is completely unspeced. We use this at Floorplanner to parse some of the custom lines we add to our log, like the current user and his account type.

from request-log-analyzer.

barttenbrinke avatar barttenbrinke commented on August 20, 2024

So what do you want to spec? The hacks?

from request-log-analyzer.

wvanbergen avatar wvanbergen commented on August 20, 2024
  • When subclassing a file format, all line types of the parent file format should be parsed, and the newly added line types should be parsed as well.
  • The parent file format should be left unchanged (so it should not parse any of the added line types).

The last bullet seems very logical/simple, but I really struggled to get this working correctly when I was implementing fileformat subclassing.

The same points can be made for the report trackers.

from request-log-analyzer.

roele avatar roele commented on August 20, 2024

Had some problems implementing a FileFormat as described since line.header and line.footer are required which is not documented (raises invalid file format exception). For me is also unclear how to work with timestamp or categories etc. since i am a Ruby-Newbie.

from request-log-analyzer.

barttenbrinke avatar barttenbrinke commented on August 20, 2024

Hello Roele :) I think the first question is: what are you trying to implement and what have you got so far?

from request-log-analyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.