summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorajax <ajax@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-29 22:05:19 +0000
committerajax <ajax@980ebf18-57e1-0310-9a29-db15c13687c0>2006-09-29 22:05:19 +0000
commitf53b9b05dbc596f4baa4bff3760b10df9f5fb59f (patch)
tree99e30918f347deb4a7dd12387a1549ef20852be0 /lib/puppet
parent04c0c1429efadd15d940097992e084870077846c (diff)
downloadpuppet-f53b9b05dbc596f4baa4bff3760b10df9f5fb59f.tar.gz
puppet-f53b9b05dbc596f4baa4bff3760b10df9f5fb59f.tar.xz
puppet-f53b9b05dbc596f4baa4bff3760b10df9f5fb59f.zip
- New type Notify for sending client-side log messages
type.rb type/notify.rb - Added server-side functions named after each of the syslog log levels (debug, info, notice, warning, err, crit, alert, and emerg) parser/functions.rb git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1707 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-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'