Class: Spool::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/spool/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commandObject

Returns the value of attribute command.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def command
  @command
end

#dirObject

Returns the value of attribute dir.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def dir
  @dir
end

#envObject

Returns the value of attribute env.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def env
  @env
end

#kill_signalObject

Returns the value of attribute kill_signal.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def kill_signal
  @kill_signal
end

#log_fileObject

Returns the value of attribute log_file.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def log_file
  @log_file
end

#log_formatterObject

Returns the value of attribute log_formatter.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def log_formatter
  @log_formatter
end

#log_levelObject

Returns the value of attribute log_level.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def log_level
  @log_level
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def name
  @name
end

#pid_fileObject

Returns the value of attribute pid_file.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def pid_file
  @pid_file
end

#processesObject

Returns the value of attribute processes.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def processes
  @processes
end

#restart_conditionObject

Returns the value of attribute restart_condition.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def restart_condition
  @restart_condition
end

#source_fileObject

Returns the value of attribute source_file.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def source_file
  @source_file
end

#stop_signalObject

Returns the value of attribute stop_signal.



4
5
6
# File 'lib/spool/configuration.rb', line 4

def stop_signal
  @stop_signal
end

Instance Method Details

#loggerObject



62
63
64
65
66
67
68
# File 'lib/spool/configuration.rb', line 62

def logger
  @logger ||= MonoLogger.new(log_file).tap do |logger|
    logger.level = MonoLogger.const_get log_level
    logger.formatter = log_formatter
    Datacenter.logger = logger
  end
end