Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger does not work #46

Open
johntdyer opened this issue May 15, 2014 · 3 comments
Open

Logger does not work #46

johntdyer opened this issue May 15, 2014 · 3 comments

Comments

@johntdyer
Copy link

Logger does not appear to be working, I have tried three different flavors of Ruby all with the same results:

Ruby 2.0.0

irb(main):002:0> require 'metriks'
=> true
irb(main):003:0>   reporter = Metriks::Reporter::Logger.new(:logger => Logger.new('log/metrics.log'))
NameError: uninitialized constant Metriks::Reporter::Logger
    from (irb):3
    from /Users/jdyer/.rbenv/versions/2.0.0-p353/bin/irb:12:in `<main>'
irb(main):004:0>

Ruby 2.1.1

irb(main):001:0> require 'metriks'
=> true
irb(main):002:0>   reporter = Metriks::Reporter::Logger.new(:logger => Logger.new('log/metrics.log'))
NameError: uninitialized constant Metriks::Reporter::Logger
    from (irb):2
    from /Users/jdyer/.rbenv/versions/2.1.1/bin/irb:11:in `<main>'
irb(main):003:0>

Ruby 1.9

irb(main):001:0> require 'metriks'
=> true
irb(main):002:0> reporter = Metriks::Reporter::Logger.new(:logger => Logger.new('log/metrics.log'))
NameError: uninitialized constant Metriks::Reporter::Logger
    from (irb):2
    from /Users/jdyer/.rbenv/versions/1.9.3-p545/bin/irb:12:in `<main>'
irb(main):003:0>
@eric
Copy link
Owner

eric commented May 15, 2014

The reporters are not automatically loaded, so you'll have to require them:

require "metriks/reporter/logger"

@johntdyer
Copy link
Author

Ah, must have missed that. I didnt see it in the readme

@thorrsson
Copy link

It isn't in the readme, I just hit the same issue
require "metriks/reporter/logger" fixed it for me as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants