Class: Fluent::LogDeviceIO
- Inherits:
-
Logger::LogDevice
- Object
- Logger::LogDevice
- Fluent::LogDeviceIO
- Defined in:
- lib/fluent/log.rb
Overview
This class delegates some methods which are used in ‘Fluent::Logger` to a instance variable(`dev`) in `Logger::LogDevice` class github.com/ruby/ruby/blob/7b2d47132ff8ee950b0f978ab772dee868d9f1b0/lib/logger.rb#L661
Instance Method Summary collapse
Instance Method Details
#flush ⇒ Object
721 722 723 724 725 726 727 |
# File 'lib/fluent/log.rb', line 721 def flush if @dev.respond_to?(:flush) @dev.flush else super end end |
#reopen(path, mode) ⇒ Object
745 746 747 748 749 750 |
# File 'lib/fluent/log.rb', line 745 def reopen(path, mode) if mode != 'a' raise "Unsupported mode: #{mode}" end super(path) end |
#sync=(v) ⇒ Object
737 738 739 740 741 742 743 |
# File 'lib/fluent/log.rb', line 737 def sync=(v) if @dev.respond_to?(:sync=) @dev.sync = v else super end end |
#tty? ⇒ Boolean
729 730 731 732 733 734 735 |
# File 'lib/fluent/log.rb', line 729 def tty? if @dev.respond_to?(:tty?) @dev.tty? else super end end |