Giter VIP home page Giter VIP logo

yarder's People

Contributors

drnic avatar ochko avatar rurounijones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yarder's Issues

Non-Rails LogSubscriber sources do not output JSON

Doing things like Rails.logger.debug "Help, I need somebody" will result in non-JSON logging.

To get around this we are going to have to create a new base logger as well.

Current questions I have regarding this:

  1. Should these statements be added to the request JSON object (if one exists) or should they be separate? (Possibly separate because log-level may be different). However if they are separate should they still use the rails log_tags if they exist?

rake test fails - uninitialized constant Yarder::ActiveRecord

> bundle exec rake test
/Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:230:in `block in constantize': uninitialized constant Yarder::ActiveRecord (NameError)
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `each'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/inflector/methods.rb:229:in `constantize'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
    from /Users/drnic/Projects/gems/yarder/lib/yarder/railtie.rb:30:in `block (2 levels) in <class:Railtie>'
    from /Users/drnic/Projects/gems/yarder/lib/yarder/railtie.rb:29:in `each'
    from /Users/drnic/Projects/gems/yarder/lib/yarder/railtie.rb:29:in `block in <class:Railtie>'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:34:in `call'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `each'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/drnic/Projects/gems/yarder/test/dummy/config/environment.rb:5:in `<top (required)>'
    from /Users/drnic/Projects/gems/yarder/test/test_helper.rb:4:in `require'
    from /Users/drnic/Projects/gems/yarder/test/test_helper.rb:4:in `<top (required)>'
    from /Users/drnic/Projects/gems/yarder/test/yarder_test.rb:1:in `require'
    from /Users/drnic/Projects/gems/yarder/test/yarder_test.rb:1:in `<top (required)>'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `require'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `each'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:9:in `block in <main>'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `select'
    from /Users/drnic/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [/Users/drnic/.rvm/rubies/ruby-1.9.3-p194/b...]

Tasks: TOP => test
(See full trace by running task with --trace)

Non-json logs

Should there still be non-json logs; or is that expected behaviour?

For example:

Served asset /jquery-ui-1.8.13.js - 304 Not Modified (38ms)
{"@source":"http://dr-nics-air/assets/jquery-ui-1.8.13.js?body=1","@tags":[],"@fields":{"client_ip":"127.0.0.1","method":"GET","path":"/assets/jquery-ui-1.8.13.js?body=1","status":304},"@timestamp":"2012-09-20T19:04:30.035651-07:00","@message":"GET /assets/jquery-ui-1.8.13.js?body=1 for 127.0.0.1","@source_host":"dr-nics-air","@source_path":"/assets/jquery-ui-1.8.13.js","@type":"rails_json_log"}

Add tests

Add tests for all this; use the Rails tests as a basis (Or rip them off them shamelessly if at all possible)

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.