You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that Embedly changes the log_level of the provided logger. In fact, it shouldn't touch the externally provided logger, but only set the log level if the logger was created by embedly itself. The workaround for time being is the following monkey patch:
Frankly, I don't like the way it's currently designed. So I don't see a good way to fix it properly without breaking the current api. I would say that Embedly shouldn't do the log level setting at all. It should receive a Logger or instantiate one, expose the logger instance, and then the user can change the log level at will. For the most cases, I assume that the users are re-using some logger (probably Rails logger), so they would prefer to set the log level globally and that's it.
And if you really want fine grain control over debugging things, then maybe it's better to have a debug method which would do something like:
I think the only reason that setting the level is in there is for the CLI to support --verbose. Over time it somehow got lumped into "configuration". That should probably be moved to the CLI related code.
Adding the following in an initializer worked ok in Rails v3.2.13, but seemed to stop all logging output after upgrading to Rails v4.0.
The text was updated successfully, but these errors were encountered: