From 7e2e12be7827c2adb64a192b5b7176c7c541af44 Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Tue, 29 Dec 2009 11:29:09 -0800 Subject: Fix for #2995 (don't fail to load PSON when UTF-8 missing) We don't actually rely on iconv's UTF-8 support, so its absence shouldn't cause the PSON feature to fail on system (e.g. HPUX) where it isn't fully implemented. This change exposed a dependency on library load order that was causing Puppet::Util::Log to raise an error. I've removed the dependency of Puppet::Type from Puppet::Util::Log. Signed-off-by: Jesse Wolfe --- lib/puppet/util/log_paths.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/puppet/util/log_paths.rb') diff --git a/lib/puppet/util/log_paths.rb b/lib/puppet/util/log_paths.rb index 1a6bafc45..46f6c481d 100644 --- a/lib/puppet/util/log_paths.rb +++ b/lib/puppet/util/log_paths.rb @@ -11,5 +11,19 @@ module Puppet::Util::LogPaths return "/" + @path.join("/") end + + def source_descriptors + descriptors = {} + + descriptors[:tags] = tags + + [:path, :file, :line, :version].each do |param| + next unless value = send(param) + descriptors[param] = value + end + + return descriptors + end + end -- cgit