Created
March 15, 2010 18:22
-
-
Save lak/333133 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require 'puppet' | |
| require 'puppet/util/log' | |
| require 'puppet/util/logging' | |
| require 'puppet/transaction/report' | |
| report = Puppet::Transaction::Report.new | |
| Puppet::Util::Log.newdestination report | |
| extend Puppet::Util::Logging | |
| def to_s | |
| # Some string describing the log source | |
| "/Node[foo]/File[bar]" | |
| end | |
| info "This is a verbose message" | |
| notice "This is a normal message" | |
| err "This is a failure" | |
| puts report.to_yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment