diff options
author | Tim Smith <tsmith@chef.io> | 2017-09-06 15:33:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 15:33:20 -0700 |
commit | 518d938ae4bcfa9da3f79030a70082cd02c30604 (patch) | |
tree | 0989e52b1f78b569c213d2ef4f96e6a3398df722 | |
parent | 819a7e39019126474761698c1d3e2a40f114b7fc (diff) | |
parent | 75bfcfb21bfb4ec9a9166647cef9bed532f465fe (diff) | |
download | ohai-518d938ae4bcfa9da3f79030a70082cd02c30604.tar.gz |
Merge pull request #1051 from chef/logging
Use standard logging in Filesystem
-rw-r--r-- | lib/ohai/plugins/linux/filesystem.rb | 4 | ||||
-rw-r--r-- | spec/unit/plugins/linux/filesystem_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/plugins/linux/filesystem.rb b/lib/ohai/plugins/linux/filesystem.rb index e15e94f2..64acc32c 100644 --- a/lib/ohai/plugins/linux/filesystem.rb +++ b/lib/ohai/plugins/linux/filesystem.rb @@ -131,7 +131,7 @@ Ohai.plugin(:Filesystem) do end end rescue Ohai::Exceptions::Exec - Ohai::Log.warn("df is not available") + Ohai::Log.warn("Plugin Filesystem: df binary is not available. Some data will not be available.") end # Grab mount information from /bin/mount @@ -148,7 +148,7 @@ Ohai.plugin(:Filesystem) do end end rescue Ohai::Exceptions::Exec - Ohai::Log.warn("mount is not available") + Ohai::Log.warn("Plugin Filesystem: mount binary is not available. Some data will not be available.") end # We used to try to decide if we wanted to run lsblk or blkid diff --git a/spec/unit/plugins/linux/filesystem_spec.rb b/spec/unit/plugins/linux/filesystem_spec.rb index 65265cd4..13aeb248 100644 --- a/spec/unit/plugins/linux/filesystem_spec.rb +++ b/spec/unit/plugins/linux/filesystem_spec.rb @@ -536,7 +536,7 @@ BLKID_TYPE describe "when #{command} does not exist" do it "logs warning about #{command} missing" do allow(plugin).to receive(:shell_out).with(/#{command}/).and_raise(Ohai::Exceptions::Exec) - expect(Ohai::Log).to receive(:warn).with("#{command} is not available") + expect(Ohai::Log).to receive(:warn).with("Plugin Filesystem: #{command} binary is not available. Some data will not be available.") plugin.run end end |