dry-rb / dry-core

A toolset of small support modules used throughout the @dry-rb & @rom-rb ecosystems
https://dry-rb.org/gems/dry-core/
MIT License
170 stars 33 forks source link

The dry-logger raises an exception #80

Open wrmk opened 9 months ago

wrmk commented 9 months ago

Describe the bug

The dry-logger raises an exception while trying to warn about something

To Reproduce

class TestLogger
  extend Dry::Initializer  
  option :array, Types::Strict::Array.default([])  
end

in this example Logger should inform about freezing the default value

The problem could be solved if we update the Logger.new in this line from Logger.new(output) to Logger.new(stream: output)

Expected behavior

Warning should be visible in the log and no exception should be raised

My environment