Sha256: e51936b74991fe573f44a4738477e29d191ed75ecb0a7764b5255cbd282fac66
Contents?: true
Size: 353 Bytes
Versions: 6
Compression:
Stored size: 353 Bytes
Contents
require 'winevt' @subscribe = Winevt::EventLog::Subscribe.new @subscribe.tail = true @subscribe.subscribe( "Security", "*[System[(Level <= 4) and TimeCreated[timediff(@SystemTime) <= 86400000]]]" ) while true do @subscribe.each do |eventlog, message, string_inserts| puts ({eventlog: eventlog, data: message}) end sleep(1) end
Version data entries
6 entries across 6 versions & 1 rubygems