winevt_c 0.3.1-x86-mingw32 → 0.3.2-x86-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: b582cc584307828fc5c24a683380dbe88f924b7a2a3b73193e38a60776a38874
4
- data.tar.gz: d7391b6fa4177f0a4dffa481e4ed7d604cd51aced9e5a26086b5dd6c03a2752e
3
+ metadata.gz: d810f976d0bd182ffdf7bf16c5ae321e80098f975a4e5c25538f120d84e75106
4
+ data.tar.gz: 06c5cab117100dfa64050a9153736c82ed9a85d571b5c1d4b818cb505209b1cd
5
5
  SHA512:
6
- metadata.gz: c426b20aea9074e14b317fb5656c0ff5ea2e844d457d15ef17b951e20333663e4ee7fbddcb43f48b96492a6312791f7cc1b1ba22a8956baca2ae7965ff25be7c
7
- data.tar.gz: 7afd306db4466ca77d98c6866ad8a8bab6e71cadfa956aa615a7dd46c3b60e41ac6083d10919ab77e14d9c073a4e7bf8bd093074478b885529328ba94b277928
6
+ metadata.gz: 536343216d88429c3be1aff745e6ebbc41194f38dfd2bd34ece1e0b75df77e62f562dabad06bb16b4ddc6031ede1d898854817dc5694c12f37135eadac3b8a1f
7
+ data.tar.gz: c6b5242c05ad3988df136a7d9a143d3e31ca1d45137c2ff5e5d4e0df660d32fe3eafb6fbead2ca85a5040b5f408c669d9a1674acaa14d64dfafe57d680876699
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: x86-mingw32
6
6
  authors:
7
7
  - Hiroshi Hatake