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

fix uninitialized constant Logger::SimpleFormatter #120

Merged
merged 1 commit into from Sep 8, 2014
Merged

fix uninitialized constant Logger::SimpleFormatter #120

merged 1 commit into from Sep 8, 2014

Conversation

btatnall
Copy link
Contributor

@btatnall btatnall commented Sep 8, 2014

Namespace SimpleFormatter properly so the following error doesn't occur.

Footnotes Log Exception: uninitialized constant Logger::SimpleFormatter

Error was created using the following environment:
rails 4.1.4
jruby 1.7.10
Rails.logger set to an instance of Log4r Logger.

Namespace SimpleFormatter properly so the following error doesn't occur.

Footnotes Log Exception: uninitialized constant Logger::SimpleFormatter
@Intrepidd
Copy link
Collaborator

Thanks!

I'm on vacation right now, I'll release the a minor version when I reach a computer.

Intrepidd pushed a commit that referenced this pull request Sep 8, 2014
fix uninitialized constant Logger::SimpleFormatter
@Intrepidd Intrepidd merged commit d6bef3b into indirect:master Sep 8, 2014
@Intrepidd
Copy link
Collaborator

I just released version 4.1.1 with your fix, thanks

@Intrepidd
Copy link
Collaborator

Indeed. It will break if a custom logger that does not inherit from the standard Ruby Logger is set.

@btatnall What was the original issue with Logger::SimpleFormatter ? Is it not defined in Jruby ? Or was there an issue with the namespacing only ?

If it's the latter, we could fix it by using ::Logger::SimpleFormatter

@Intrepidd
Copy link
Collaborator

Ok so after a quick check SimpleFormatter is activesupport, my bad.

It's not defined in 3.2, so this code already broke before this PR.

TODO:

  • Find another way to perform the log note without Logger::SimpleFormatter
  • Add specs on this code where there is no Rails Logger

@btatnall
Copy link
Contributor Author

btatnall commented Nov 3, 2014

Using log4r the constant was not defined.

@Intrepidd
Copy link
Collaborator

@bteitelb this should be fixed thanks to #125, I'll add some specs and release ASAP

Intrepidd pushed a commit that referenced this pull request Nov 6, 2014
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

Successfully merging this pull request may close these issues.

None yet

3 participants