diff options
author | ajax <ajax@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-29 22:05:19 +0000 |
---|---|---|
committer | ajax <ajax@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-09-29 22:05:19 +0000 |
commit | f53b9b05dbc596f4baa4bff3760b10df9f5fb59f (patch) | |
tree | 99e30918f347deb4a7dd12387a1549ef20852be0 | |
parent | 04c0c1429efadd15d940097992e084870077846c (diff) | |
download | puppet-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
-rw-r--r-- | lib/puppet/parser/functions.rb | 7 |
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' |