diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-27 18:03:03 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-02-27 18:03:03 -0800 |
commit | 1da5486e115612bf1f838597f13a2229c5241b51 (patch) | |
tree | 881ae2671c19569ed645da0e0f1742d6a0ba2c5c | |
parent | ba6eb720ee601d4c150e0a3ebdc8236c990bbcb0 (diff) | |
download | ohai-1da5486e115612bf1f838597f13a2229c5241b51.tar.gz |
add some comments to the code
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/ohai/log.rb | 2 | ||||
-rw-r--r-- | lib/ohai/system.rb | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/ohai/log.rb b/lib/ohai/log.rb index 4fe837ac..832bf005 100644 --- a/lib/ohai/log.rb +++ b/lib/ohai/log.rb @@ -22,6 +22,8 @@ module Ohai class Log extend Mixlib::Log + # this class loading initalization is so that we don't lose early logger + # messages when run from the CLI? init(STDERR) level = :info diff --git a/lib/ohai/system.rb b/lib/ohai/system.rb index 6ce3cf2f..6fa56085 100644 --- a/lib/ohai/system.rb +++ b/lib/ohai/system.rb @@ -39,6 +39,10 @@ module Ohai attr_reader :provides_map attr_reader :v6_dependency_solver + # the cli flag is used to determine if we're being constructed by + # something like chef-client (which doesn't not set this flag) and + # which sets up its own loggers, or if we're coming from Ohai::Application + # and therefore need to configure Ohai's own logger. def initialize(config = {}, cli: false) @cli = cli @plugin_path = "" |