mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-27 05:48:41 -05:00
Move logger instance to class var in FloatyLogger
This moves the instance of the logger class to a class variable in the `FloatyLogger` class and provides three class methods to log with in the rest of the project `FloatyLogger.info`, `FloatyLogger.warn`, and `FloatyLogger.error`.
This commit is contained in:
parent
8ec90007ca
commit
35faeab6be
7 changed files with 59 additions and 47 deletions
|
|
@ -8,7 +8,7 @@ class Conf
|
|||
begin
|
||||
conf = YAML.load_file("#{Dir.home}/.vmfloaty.yml")
|
||||
rescue StandardError
|
||||
Vmfloaty.logger.warn "WARNING: There was no config file at #{Dir.home}/.vmfloaty.yml"
|
||||
FloatyLogger.warn "WARNING: There was no config file at #{Dir.home}/.vmfloaty.yml"
|
||||
end
|
||||
conf
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue