Class: Kamal::Output::FileLogger
- Inherits:
-
BaseLogger
- Object
- BaseLogger
- Kamal::Output::FileLogger
- Defined in:
- lib/kamal/output/file_logger.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #<<(message) ⇒ Object
-
#initialize(path:) ⇒ FileLogger
constructor
A new instance of FileLogger.
Constructor Details
#initialize(path:) ⇒ FileLogger
Returns a new instance of FileLogger.
9 10 11 12 |
# File 'lib/kamal/output/file_logger.rb', line 9 def initialize(path:) @path = Pathname.new(path) super() end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
2 3 4 |
# File 'lib/kamal/output/file_logger.rb', line 2 def path @path end |
Class Method Details
.build(settings:, config:) ⇒ Object
4 5 6 7 |
# File 'lib/kamal/output/file_logger.rb', line 4 def self.build(settings:, config:) raise ArgumentError, "file path is required" unless settings["path"] new(path: settings["path"]) end |
Instance Method Details
#<<(message) ⇒ Object
14 15 16 |
# File 'lib/kamal/output/file_logger.rb', line 14 def <<() @file&.print() end |