Sha256: d509e570cea1520317bb8ae55b82a34e8ca9da016a99eaaee8ea50a1af973423

Contents?: true

Size: 549 Bytes

Versions: 4

Compression:

Stored size: 549 Bytes

Contents

module LogView
  class DoTail < DoSSH
    include LogView::Colors

    protected
    def execute_command server, channel, file
      channel.on_data {|ch, data| puts create_split(data, server, file)}
      puts channel.exec(" tail -f #{file}" + @obj_config.grep_string + "\n")
    end

    private
    def create_split data, server, file
      if @obj_config.options.split_log == true
        string = "\n[#{paint(32, server)}:#{paint(33,file)}]:\n#{data}\n"
      else
        string = ":\n#{data}\n"
      end

      string
    end
  end
end





Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
log_view-0.2.1 lib/log_view/do_tail.rb
log_view-0.2.0 lib/log_view/do_tail.rb
log_view-0.1.0 lib/log_view/do_tail.rb
log_view-0.0.1 lib/log_view/do_tail.rb