winevt_c 0.3.1-x64-mingw32 → 0.3.2-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae7b5925121a5db5f4ab4d875ffe914c5cf55a042812b92f144662bdbfb06d71
4
- data.tar.gz: 1771d4a956c5865adb8268314748138055f4e28e4c80b3a7cb1d7e0d4aaee741
3
+ metadata.gz: 796d07047951ecc8f038dfec2db2bf970da7f8a4f63b6ca9c0c01136fb5cb4cf
4
+ data.tar.gz: bad21f43be67c17e8b54721ecb34cfd6c00cd4b51c0f81cf84c5596829931c72
5
5
  SHA512:
6
- metadata.gz: 1fba2b5c8806e5aac8dc0cc3fd2810cce5922f451331ccfa39d38850375c5392eb39f382681d938fbaede35d0a895cbc8dfa1f61982ff75abe6a671823442dad
7
- data.tar.gz: af7c0f3bbb32df42d02b447561fdf73202d96351a16a845ef755e8c5178e8aa3f6dc02e09cc213fd9b81f17697f373dcececa520110059c57d10430aff74e0f4
6
+ metadata.gz: e15c6bb8b48c107e6534f4d727331ae020aa431cb8f4264bd47dc6455dad37dd9ce658f0a1f1b0314a9f46d46c3b7e2d1562d5d3f6df6b62f184cc25c082b0a0
7
+ data.tar.gz: ecc10d8c811200216058dc6072fd43920aafd98903b5d60203a0240531908ca65cb7445e564a94890ca3f9022da9c4722299aea0e27cced890e6f5ab57513164
data/example/eventlog.rb CHANGED
@@ -3,14 +3,6 @@ require 'rexml/document'
3
3
 
4
4
  @query = Winevt::EventLog::Query.new("Application", "*[System[(Level <= 3) and TimeCreated[timediff(@SystemTime) <= 86400000]]]")
5
5
 
6
- @query.each do |eventlog, message|
7
- doc = REXML::Document.new(eventlog)
8
- nodes = []
9
- REXML::XPath.each(doc, "/Event/EventData/Data") do |node|
10
- nodes << node.text
11
- end
12
- message = message.gsub(/(%\d+)/, '\1$s')
13
- message = sprintf(message, *nodes)
14
-
6
+ @query.each do |eventlog, message, string_inserts|
15
7
  puts ({eventlog: eventlog, data: message})
16
8
  end
data/example/tailing.rb CHANGED
@@ -8,13 +8,9 @@ while (1) do
8
8
  if @subscribe.next
9
9
  eventlog = @subscribe.render
10
10
  message = @subscribe.message
11
- doc = REXML::Document.new(eventlog)
12
- nodes = []
13
- REXML::XPath.each(doc, "/Event/EventData/Data") do |node|
14
- nodes << node.text
15
- end
11
+ string_inserts = @subscribe.string_inserts
16
12
  message = message.gsub(/(%\d+)/, '\1$s')
17
- message = sprintf(message, *nodes)
13
+ message = sprintf(message, *string_inserts)
18
14
 
19
15
  puts ({eventlog: eventlog, data: message})
20
16
  else
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module Winevt
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winevt_c
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Hiroshi Hatake