File: file.rb

package info (click to toggle)
ruby-dry-logger 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: ruby: 802; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 300 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require "pathname"

require "dry/logger/backends/stream"

module Dry
  module Logger
    module Backends
      class File < Stream
        def initialize(stream:, **opts)
          Pathname(stream).dirname.mkpath
          super
        end
      end
    end
  end
end