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

Fluent::Logger::TestLogger.open returns a Fluent::Logger::FluentLogger instance #17

Open
eagletmt opened this issue Apr 14, 2014 · 3 comments

Comments

@eagletmt
Copy link

At fluent-logger 0.4.7, Fluent::Logger::TestLogger.open returns a Fluent::Logger::TestLogger instance.
At fluent-logger 0.4.8, it returns a Fluent::Logger::FluentLogger instance.
It's caused by 2068b44 discussed in #10.

Is it an intended change?

@repeatedly
Copy link
Member

Hmm. We seem to do same check in Fluent::Logger::LoggerBase.open like Fluent::Logger.open.

    if !args.first.is_a?(Class) || !args.first.ancestors.include?(LoggerBase)
      args.unshift(self)
    end

@daichirata
Copy link

class LoggerBase
  def self.open(*args, &block)
    Fluent::Logger.open(*args, &block)
  end

I think that it is the problem which stopped including self in an argument by change of #16.
If it is problem, I can write a patch. What do you think?

@repeatedly
Copy link
Member

@daic-h If you have more better solution to fix this and #16, patches are welcome!

eagletmt added a commit to eagletmt/fluent-logger-ruby that referenced this issue Nov 11, 2014
It has changed at fluent#16 (see also fluent#17).
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