Class: MyStuff::Logger::ReaderFilters::TailFollowHighlight
- Inherits:
-
MyStuff::Logger::ReaderFilter
- Object
- MyStuff::Logger::ReaderFilter
- MyStuff::Logger::ReaderFilters::TailFollowHighlight
- Defined in:
- lib/my_stuff/logger/reader_filters/tail_follow_highlight.rb
Overview
If you actually pipe tail -F through this…
Instance Method Summary collapse
Methods inherited from MyStuff::Logger::ReaderFilter
Instance Method Details
#filter_line(line, options = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/my_stuff/logger/reader_filters/tail_follow_highlight.rb', line 6 def filter_line line, = {} if [:colorize] line.sub(/^(tail: .+ new file$)/, "\e[1m\\1\e[0m") else line end end |