Skip to content

Fallback to Logger parameters incorrect #7

Description

@lloydpick

The logger fallback implementation seems to fail when using a non STDOUT or STDERR location in cold boot outside of the handler. I believe this is because the orig_initialize misses that the first 3 parameters are normal, but the remaining are named.

orig_initialize(logdev, shift_age, shift_size, level, progname,
formatter, datetime_format, binmode, shift_period_suffix)

https://github.com/ruby/logger/blob/afe0da71087d721de7107f6bee7631b8b71a2471/lib/logger.rb#L380-L382

You end up with an error like the one described in this issue - airbrake/airbrake-ruby#630

Raising this here, as I know this occurs within the Lambda environment on Ruby 2.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    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