-
Notifications
You must be signed in to change notification settings - Fork 76
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
Unable to construct a default logger of non-default type #10
Comments
I'm working on adding test coverage for this issue but I'm having issues getting rspec to run (see https://gist.github.com/tbrosman/7350939).
fluent-logger-ruby is at revision 35d7fd0 and fluentd is at revision 4e73be1 Am I missing some dependency? |
How about |
That worked, thanks! I'm attempting to get rspec passing on existing cases before I add anything new. Now I'm seeing:
I'm assuming the regex is out of date, but even after changing it to
Is there some change that could cause this? |
I just disabled this spec and other maintainer will fix. |
I rebased and now logger_base_spec.rb fails (with my fix; without it works normally). I see that *args is nil, where is open being called from in this spec? Is there a mock somewhere I'm not seeing? Callstack:
Edit Ah, I see, open is called by the spec. This raises the question does it make sense for |
It looks like |
How about another method approach like |
@tbrosman What version of ruby?
|
My ruby version: If you want to see what my environment looks like, I'm using this Vagrantfile: https://gist.github.com/tbrosman/7367254 I'm assuming you mean add |
Hmm... I have another idea. Replaces weird treasure-data/td-logger-ruby@a72cc13 It is more safer and readable. |
Thanks, that fixed it! One more (tiny) issue: in my previous comment (#10 (comment)) I was attempting to construct FluentLogger without parameters (as apparently other logger types can, otherwise the spec would never have passed in the first place). My workaround is to have a default tag FluentLogger would be constructed with if no parameters were specified. Any preference on what that should be? (An empty string?) |
Sorry for the delay. I think empty string is enough. |
Closing. Thanks! |
The following line:
Should instantiate a CompoundFluentLogger and set @@default_logger. Currently a FluentLogger is instantiated instead. This is because LoggerBase#open passes self as the first parameter to Logger#open.
The text was updated successfully, but these errors were encountered: