mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Log to a (configurable) file
This commit is contained in:
parent
2f4bdaf67a
commit
57975a489f
2 changed files with 12 additions and 4 deletions
|
|
@ -9,9 +9,6 @@ require 'lib/logger'
|
|||
require 'lib/require_relative'
|
||||
require 'lib/vsphere_helper'
|
||||
|
||||
$logger = Logger.new
|
||||
$vsphere_helper = VsphereHelper.new
|
||||
|
||||
Dir.chdir(File.dirname(__FILE__))
|
||||
|
||||
# Load the configuration file
|
||||
|
|
@ -21,6 +18,10 @@ config = YAML.load_file(config_file)
|
|||
pools = config[:pools]
|
||||
vsphere = config[:vsphere]
|
||||
|
||||
# Load logger & vSphere helper libraries
|
||||
$logger = Logger.new config[:config]['logfile']
|
||||
$vsphere_helper = VsphereHelper.new
|
||||
|
||||
# Connect to Redis
|
||||
$redis = Redis.new
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue