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

fatal logging doesn't #141

Description

@hickey

When attempting to use the built in logger with a fatal message, the following errors get produced:

[2013/09/09 03:14:17.584] !! /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger.rb:133:in `format_message': undefined method `format_fatal' for #<Cinch::Logger::FormattedLogger:0x007fc1f2036bf8> (NoMethodError)
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger.rb:115:in `block (2 levels) in log'
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger.rb:113:in `each'
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger.rb:113:in `block in log'
[2013/09/09 03:14:17.584] !!    <internal:prelude>:10:in `synchronize'
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger.rb:112:in `log'
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger_list.rb:19:in `block in log'
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger_list.rb:19:in `each'
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/logger_list.rb:19:in `log'
[2013/09/09 03:14:17.584] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/helpers.rb:135:in `log'
[2013/09/09 03:14:17.585] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/helpers.rb:150:in `fatal'
[2013/09/09 03:14:17.585] !!    /Volumes/ebay-Projects/sobot/plugins/pid_file.rb:59:in `create_pidfile'
[2013/09/09 03:14:17.585] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/plugin.rb:318:in `block (2 levels) in __register_listeners'
[2013/09/09 03:14:17.585] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/handler.rb:88:in `call'
[2013/09/09 03:14:17.585] !!    /Users/ghickey/.rvm/gems/ruby-1.9.3-p327/gems/cinch-2.0.7/lib/cinch/handler.rb:88:in `block in call'

Further testing gives the following results:

debug: works as expected -- [2013/09/09 03:30:42.132] !! [Cinch::PidFile] This is debug
info: works as expected -- [2013/09/09 03:30:42.134] II [Cinch::PidFile] This is info
warn: message get printed as a debug message -- [2013/09/09 03:30:42.135] !! [Cinch::PidFile] This is warn
error: no logging decorations, just the message -- [Cinch::PidFile] This is error

exception is probably working given that fatal is throwing an exception and the above output displays it (with red !!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions