Sha256: 3301bd3fc7003ee34eefc768c09de4e99a693794f2ac555b13c7ccc3b2855f43

Contents?: true

Size: 533 Bytes

Versions: 1

Compression:

Stored size: 533 Bytes

Contents

require 'monitor'

class LogLocationCache::Svlogd < LogLocationCache::Base

protected
  def get_pid_location(lpid)
    folder = log_folder(lpid)
    return nil  if folder.nil?

    File.join(folder, 'current')
  end

  def logger_name
    'svlogd'
  end

  def log_folder(lpid)
    log_folder_base_name(lpid)
  end

  def set_pid_log_location(pid, log_location)
    remove_old_values

    monitor.synchronize do
      pids[pid.to_i] = {
        :value => log_location,
        :time  => Time.now
      }
    end

    self
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
runit-man-2.4.0a1 lib/runit-man/log_location_cache/svlogd.rb