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

SizeRollingLogFile.flush raises NameError if no max_size is set #12

Open
dirkbolte opened this issue Aug 29, 2013 · 0 comments
Open

SizeRollingLogFile.flush raises NameError if no max_size is set #12

dirkbolte opened this issue Aug 29, 2013 · 0 comments

Comments

@dirkbolte
Copy link

The following code results in a NameError:

require 'lumberjack'
Lumberjack::Device::SizeRollingLogFile.new('test.log').flush

Backtrace:

from /home/dirkbolte/.rvm/gems/ruby-1.9.3-p392/gems/lumberjack-1.0.4/lib/lumberjack/device/size_rolling_log_file.rb:40:in `>'
    from /home/dirkbolte/.rvm/gems/ruby-1.9.3-p392/gems/lumberjack-1.0.4/lib/lumberjack/device/size_rolling_log_file.rb:40:in `roll_file?'
    from /home/dirkbolte/.rvm/gems/ruby-1.9.3-p392/gems/lumberjack-1.0.4/lib/lumberjack/device/rolling_log_file.rb:46:in `before_flush'
    from /home/dirkbolte/.rvm/gems/ruby-1.9.3-p392/gems/lumberjack-1.0.4/lib/lumberjack/device/writer.rb:95:in `block in flush'
    from :10:in `synchronize'
    from /home/dirkbolte/.rvm/gems/ruby-1.9.3-p392/gems/lumberjack-1.0.4/lib/lumberjack/device/writer.rb:94:in `flush'
    from (irb):3
    from /home/dirkbolte/.rvm/rubies/ruby-1.9.3-p392/bin/irb:13:in `'

I would expect to either have initialize throw an exception if max_size is not set or to have the other functions work with nil.

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

No branches or pull requests

1 participant