module Tailer

Public Class Methods

stack_tail(stack, channel, channel_count) click to toggle source

Checks if stack log symlink exists and creates Tailer for it

# File lib/deployinator/stack-tail.rb, line 27
def self.stack_tail(stack, channel, channel_count)
  if Deployinator.get_stacks.include?(stack)
    filename = "#{Deployinator::Helpers::RUN_LOG_PATH}current-#{stack}"
    start_pos = (channel_count == 0) ? 0 : -1
    File.exists?(filename) ? StackTail.new(filename, channel, start_pos) : false
  end
end