summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/functions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/functions.rb')
-rw-r--r--lib/puppet/parser/functions.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions.rb b/lib/puppet/parser/functions.rb
index 9292e43f5..9562441bc 100644
--- a/lib/puppet/parser/functions.rb
+++ b/lib/puppet/parser/functions.rb
@@ -137,6 +137,13 @@ module Functions
raise Puppet::ParseError, vals.to_s
end
+ # Runs a newfunction to create a function for each of the log levels
+ Puppet::Log.levels.each do |level|
+ newfunction(level, :statement) do |vals|
+ send(level, vals.join(" "))
+ end
+ end
+
newfunction(:template, :rvalue) do |vals|
require 'erb'