Skip to content

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

@jasonwbarnett

Description

@jasonwbarnett

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UntriagedAn issue that has yet to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions