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

`initialize': wrong number of arguments when passing time to ::init #55

Open
jasonwbarnett opened this issue Jun 14, 2019 · 0 comments
Open
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@jasonwbarnett
Copy link

jasonwbarnett commented Jun 14, 2019

Version:

v3.0.1

Environment:

RHEL 6
ChefDK v4.0.60

Scenario:

Trying to leverage the built-in log rotation

Steps to Reproduce:

require 'mixlib/log'

class Log
  extend Mixlib::Log
end

Log.init('/tmp/logfile', 7)

Expected Result:

I would expect this to start logging to /tmp/logfile and to automatically rotate the log.

Actual Result:

Traceback (most recent call last):
        6: from /opt/chefdk/embedded/bin/irb:11:in `<main>'
        5: from (irb):7
        4: from /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-log-3.0.1/lib/mixlib/log.rb:83:in `init'
        3: from /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-log-3.0.1/lib/mixlib/log.rb:177:in `logger_for'
        2: from /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-log-3.0.1/lib/mixlib/log.rb:177:in `new'
        1: from /opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/mixlib-log-3.0.1/lib/mixlib/log/logger.rb:35:in `initialize'
ArgumentError (wrong number of arguments (given 2, expected 1))
@jasonwbarnett jasonwbarnett added the Status: Untriaged An issue that has yet to be triaged. label Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant