Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

FormattedLogger#log doesn't work with message kind :generic #38

Closed
maxstepanov opened this issue Apr 11, 2011 · 4 comments
Closed

FormattedLogger#log doesn't work with message kind :generic #38

maxstepanov opened this issue Apr 11, 2011 · 4 comments
Assignees
Labels
Milestone

Comments

@maxstepanov
Copy link

log method never set prefix when message kind is :generic tho it's the default.
crash in 'lib/cinch/logger/formatted_logger.rb', line 55

[2011/04/12 02:33:32.088] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/logger/formatted_logger.rb:55:in block (2 levels) in log': undefined method+' for nil:NilClass (NoMethodError)
[2011/04/12 02:33:32.088] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/logger/formatted_logger.rb:31:in each' [2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/logger/formatted_logger.rb:31:inblock in log'
[2011/04/12 02:33:32.089] !! internal:prelude:10:in synchronize' [2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/logger/formatted_logger.rb:29:inlog'
[2011/04/12 02:33:32.089] !! /home/max/Documents/dev/tornbot/plugins/control.rb:30:in join' [2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/plugin.rb:207:incall'
[2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/plugin.rb:207:in block (2 levels) in __register_with_bot' [2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/bot.rb:637:ininstance_exec'
[2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/bot.rb:637:in block (2 levels) in invoke' [2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/bot.rb:636:incatch'
[2011/04/12 02:33:32.089] !! /home/max/.rvm/gems/ruby-1.9.2-p180@tornbot/gems/cinch-1.1.2/lib/cinch/bot.rb:636:in `block in invoke'

@ghost ghost assigned dominikh Apr 12, 2011
@dominikh
Copy link
Member

Thanks for reporting this issue. The next version of Cinch will have a completely revised logging facility, which will also fix the issue you found.

Did you manually call the #log method with the :generic type, or did this happen within Cinch itself?

If the former is the case, I advise you to use a different type for now.

@maxstepanov
Copy link
Author

i called @bot.logger.log("string") inside a plugin.
i'm using @bot.logger.debug for now.

@maxstepanov
Copy link
Author

closed? i didn't mean to do that

@dominikh
Copy link
Member

df84830 and onward change most parts of the logging system. Using #log with the default arguments will be possible from 6bb4ecf onward, there is no type "generic" anymore, though. The logging now works similar to log4r, using a severity-based system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants