mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-160) Revise some smelly logger code
Need the logger code in promstats.rb so move logger initialisation to the top of the vmpooler script, remove the class method from vmpooler.rb and make appropriate downstream changes to metrics and pooler manger handling. This also means we can start decent logging in the API if we wish do. Fixed up to rebase on top of Matts POOLER-158 changes
This commit is contained in:
parent
bbd76bde4c
commit
5c38ba240a
6 changed files with 17 additions and 26 deletions
|
|
@ -11,7 +11,8 @@ redis_connection_pool_size = config[:redis]['connection_pool_size']
|
|||
redis_connection_pool_timeout = config[:redis]['connection_pool_timeout']
|
||||
logger_file = config[:config]['logfile']
|
||||
|
||||
metrics = Vmpooler::Metrics.init(config)
|
||||
logger = Vmpooler::Logger.new logger_file
|
||||
metrics = Vmpooler::Metrics.init(logger, config)
|
||||
|
||||
torun_threads = []
|
||||
if ARGV.count == 0
|
||||
|
|
@ -41,7 +42,7 @@ if torun.include? 'manager'
|
|||
manager = Thread.new do
|
||||
Vmpooler::PoolManager.new(
|
||||
config,
|
||||
Vmpooler.new_logger(logger_file),
|
||||
logger,
|
||||
Vmpooler.redis_connection_pool(redis_host, redis_port, redis_password, redis_connection_pool_size, redis_connection_pool_timeout, metrics),
|
||||
metrics
|
||||
).execute!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue