diff options
Diffstat (limited to 'lib/chef/log/winevt.rb')
-rw-r--r-- | lib/chef/log/winevt.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/chef/log/winevt.rb b/lib/chef/log/winevt.rb index e355ff8162..c5b7c3485a 100644 --- a/lib/chef/log/winevt.rb +++ b/lib/chef/log/winevt.rb @@ -32,7 +32,8 @@ class Chef INFO_EVENT_ID = 10100 WARN_EVENT_ID = 10101 DEBUG_EVENT_ID = 10102 - FATAL_EVENT_ID = 10103 + ERROR_EVENT_ID = 10103 + FATAL_EVENT_ID = 10104 # Since we must install the event logger, this is not really configurable SOURCE = 'Chef' @@ -75,6 +76,15 @@ class Chef ) end + def error(msg) + @eventlog.report_event( + :event_type => ::Win32::EventLog::ERROR_TYPE, + :source => SOURCE, + :event_id => ERROR_EVENT_ID, + :data => [msg] + ) + end + def fatal(msg) @eventlog.report_event( :event_type => ::Win32::EventLog::ERROR_TYPE, |