Fluent::Logger::TestLogger.open returns a Fluent::Logger::FluentLogger instance
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 https://github.com/fluent/fluent-logger-ruby/commit/2068b4468025482306ecc587d383903dc1454ff9 discussed in #10.
Is it an intended change?
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
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?
@daic-h If you have more better solution to fix this and #16, patches are welcome!