win32-eventlog 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +2 -0
- data/CHANGES +254 -248
- data/MANIFEST +21 -19
- data/README +81 -82
- data/Rakefile +3 -6
- data/certs/djberg96_pub.pem +21 -0
- data/doc/tutorial.txt +136 -136
- data/examples/example_notify.rb +23 -23
- data/examples/example_read.rb +83 -83
- data/examples/example_write.rb +64 -64
- data/lib/win32-eventlog.rb +1 -0
- data/lib/win32/eventlog.rb +1139 -1139
- data/lib/win32/mc.rb +120 -120
- data/lib/win32/windows/constants.rb +56 -56
- data/lib/win32/windows/functions.rb +61 -61
- data/lib/win32/windows/helper.rb +13 -13
- data/lib/win32/windows/structs.rb +30 -30
- data/misc/install_msg.rb +46 -46
- data/misc/rubymsg.mc +35 -35
- data/test/foo.mc +24 -24
- data/test/test_eventlog.rb +319 -319
- data/test/test_mc.rb +64 -64
- data/win32-eventlog.gemspec +30 -30
- metadata +29 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57c5af61f5d5982eac028bbba518bb4cbbd6abff
|
4
|
+
data.tar.gz: 399d6974488ca60f26524e9ad9a0c1e7ecd74f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df455a32a65af0aa56fa7187f2ea28e88d70b50ee8e41bb86061384cc44a3b8c27ef659b1bd8982af4fdb253306aeac6cb66892e00b18527fa5b176ef191e28d
|
7
|
+
data.tar.gz: d8c7e0be06cafe7eee9ac48599e58635828528cf7751ef0b92ccf4829e748f671481ba87de8036ace3bfc48972e21862aad704c8afb6512af1b593dffa57aa4f
|
checksums.yaml.gz.sig
ADDED
data.tar.gz.sig
ADDED
data/CHANGES
CHANGED
@@ -1,248 +1,254 @@
|
|
1
|
-
== 0.6.
|
2
|
-
*
|
3
|
-
|
4
|
-
|
5
|
-
*
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
*
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
*
|
18
|
-
|
19
|
-
*
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
*
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
*
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
*
|
37
|
-
|
38
|
-
|
39
|
-
*
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
*
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
*
|
51
|
-
|
52
|
-
*
|
53
|
-
|
54
|
-
|
55
|
-
*
|
56
|
-
|
57
|
-
|
58
|
-
*
|
59
|
-
|
60
|
-
|
61
|
-
*
|
62
|
-
|
63
|
-
|
64
|
-
*
|
65
|
-
|
66
|
-
|
67
|
-
*
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
*
|
74
|
-
method
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
*
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
* Fixed
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
== 0.4.
|
95
|
-
*
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
*
|
102
|
-
|
103
|
-
|
104
|
-
* Removed the
|
105
|
-
|
106
|
-
|
107
|
-
*
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
*
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
* Fixed a bug in the EventLog
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
* Fixed a
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
*
|
131
|
-
*
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
* Added
|
137
|
-
*
|
138
|
-
|
139
|
-
|
140
|
-
== 0.3.
|
141
|
-
*
|
142
|
-
*
|
143
|
-
*
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
*
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
*
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
*
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
== 0.2.
|
183
|
-
* Fixed a bug
|
184
|
-
|
185
|
-
*
|
186
|
-
of
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
*
|
192
|
-
|
193
|
-
*
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
*
|
200
|
-
|
201
|
-
|
202
|
-
*
|
203
|
-
|
204
|
-
*
|
205
|
-
|
206
|
-
|
207
|
-
*
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
*
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
*
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
*
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
*
|
232
|
-
|
233
|
-
*
|
234
|
-
|
235
|
-
|
236
|
-
*
|
237
|
-
*
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
*
|
243
|
-
*
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
*
|
1
|
+
== 0.6.4 - 25-Oct-2015
|
2
|
+
* Fixed function prototype and call for CreateEvent.
|
3
|
+
* This gem is now signed.
|
4
|
+
* Any gem related tasks in the Rakefile now assume Rubygems 2.x.
|
5
|
+
* Added a win32-eventlog.rb file for convenience.
|
6
|
+
|
7
|
+
== 0.6.3 - 20-May-2015
|
8
|
+
* Added a workaround for a bug in 64-bit JRuby.
|
9
|
+
|
10
|
+
== 0.6.2 - 6-Oct-2014
|
11
|
+
* Now rescues LoadError if the wevtapi lib cannot be found. Thanks go to
|
12
|
+
Josh Cooper for the patch.
|
13
|
+
|
14
|
+
== 0.6.1 - 1-Jun-2014
|
15
|
+
* Added the read_last_event instance method. This was already in the code as
|
16
|
+
as a private method but it is now public.
|
17
|
+
* Removed some intermediate variables and properly re-use some memory pointers
|
18
|
+
to be more memory efficient.
|
19
|
+
* Changed File.exists? to File.exist? everywhere to avoid warnings in Ruby 2.1.
|
20
|
+
|
21
|
+
== 0.6.0 - 13-Jan-2014
|
22
|
+
* Now assumes Windows Vista or later and Ruby 1.9.1 or later.
|
23
|
+
* The code base has been converted to use FFI, and now works with JRuby.
|
24
|
+
* The report_event method now accepts an array of strings.
|
25
|
+
* The ERROR, WARN and INFO constants were changed to ERROR_TYPE, WARN_TYPE and
|
26
|
+
INFO_TYPE.
|
27
|
+
* The rake and ptools gems have been added as development dependencies.
|
28
|
+
|
29
|
+
== 0.5.3 - 26-Oct-2011
|
30
|
+
* Fixed the String#nstrip method for Ruby 1.9.x. Thanks go to Jason Bourne
|
31
|
+
for the spot and Ben Jansen for the patch.
|
32
|
+
* Refactored the Rakefile and tests.
|
33
|
+
|
34
|
+
== 0.5.2 - 21-Aug-2009
|
35
|
+
* EventLogStruct's are now frozen on read operations. This is read-only data.
|
36
|
+
* Added a test to validate that structs are frozen.
|
37
|
+
|
38
|
+
== 0.5.1 - 8-Aug-2009
|
39
|
+
* License changed to Artistic 2.0.
|
40
|
+
* Some gemspec updates; test-unit and ptools are now development dependencies
|
41
|
+
instead of runtime dependencies and the description has been updated.
|
42
|
+
* Some RDoc updates, including documentation of the event type constants.
|
43
|
+
* Several RDoc updates for the Win32::MC class.
|
44
|
+
* Minor refactoring of the test suite.
|
45
|
+
* Added rake tasks for running the mc or eventlog libraries separately, as
|
46
|
+
well as tasks for running the examples.
|
47
|
+
* Example programs renamed to avoid any confusion with actual test files.
|
48
|
+
|
49
|
+
== 0.5.0 - 12-Sep-2008
|
50
|
+
* Fixed an issue for Windows Vista and later where some event descriptions
|
51
|
+
were missing. This fix requires windows-pr 0.9.3 or later.
|
52
|
+
* The EventLog#full? method now raises an EventLog::Error if it should fail
|
53
|
+
instead of a StandardError.
|
54
|
+
* Minor tweak to mc.rb - chomp the input file name if run as a program.
|
55
|
+
* Added test-unit 2.0.0 or later as a dependency.
|
56
|
+
* Added ptools as a dependency for the sake of the test suite.
|
57
|
+
* Renamed the test files to start with 'test_'.
|
58
|
+
* Removed the ts_all.rb file.
|
59
|
+
|
60
|
+
== 0.4.9 - 7-Sep-2008
|
61
|
+
* The private get_description method, which is used internally to read the
|
62
|
+
event log, has been updated to work with 64 bit Windows. The changes needed
|
63
|
+
for this require a more recent windows-pr library, i.e. 0.9.2 or later.
|
64
|
+
* Now properly separates the string inserts and description in the private
|
65
|
+
method get_last_event. This fixes the description and string_insert
|
66
|
+
properties for both the EventLog#tail and EventLog#notify_change methods.
|
67
|
+
* Some internal refactoring to use begin/ensure where appropriate.
|
68
|
+
|
69
|
+
== 0.4.8 - 17-May-2008
|
70
|
+
* Fixed in a bug in the EventLog#read method where a log entry requiring
|
71
|
+
over 64k would fail and spiral into an infinite loop. Thanks go to
|
72
|
+
Stuart Clarke for the spot.
|
73
|
+
* Improved handling of failed log reading in the read_last_event private
|
74
|
+
method.
|
75
|
+
|
76
|
+
== 0.4.7 - 8-Dec-2007
|
77
|
+
* Fixed a bug where you couldn't write to custom (parent) event sources.
|
78
|
+
Thanks go to Tim Uckun for the spot.
|
79
|
+
* Now handles ParameterMessageFiles, both in the EventLog.add_event_source
|
80
|
+
method and in terms of getting event descriptions properly. Thanks go to
|
81
|
+
botp for spotting the description problem.
|
82
|
+
* The EventLog.open_backup method handles a block the same way that the
|
83
|
+
EventLog.open method does.
|
84
|
+
* The EventLog.add_event_source now returns the creation disposition
|
85
|
+
instead of self.
|
86
|
+
|
87
|
+
== 0.4.6 - 27-Aug-2007
|
88
|
+
* Reading event logs is now approximately 5-7 times faster!
|
89
|
+
* Fixed a potential bug where, in rare cases, event descriptions could be
|
90
|
+
overwritten by other event descriptions.
|
91
|
+
* Fixed a bug where, in unusual cases, there was leading garbage in the
|
92
|
+
event descriptions.
|
93
|
+
|
94
|
+
== 0.4.5 - 25-Aug-2007
|
95
|
+
* Fixed two potential issues where reading from remote event log sources
|
96
|
+
could fail either due to permissions (reading DLL's) or because local
|
97
|
+
registry entries didn't necessarily match the remote registry entries.
|
98
|
+
Thanks go to Andrew Garberoglio and Ivan Shiel for the spot.
|
99
|
+
|
100
|
+
== 0.4.4 - 31-Jul-2007
|
101
|
+
* The EventLogError class is now EventLog::Error.
|
102
|
+
* The MCError class is now MC::Error.
|
103
|
+
* Added a Rakefile with tasks for installation and testing.
|
104
|
+
* Removed the install.rb file. Installation is now handled by the Rakefile.
|
105
|
+
* Fixed some bad test cases in tc_eventlog.rb.
|
106
|
+
* Added some more source comments.
|
107
|
+
* Updates to the README and MANIFEST file.
|
108
|
+
|
109
|
+
== 0.4.3 - 18-Dec-2006
|
110
|
+
* Removed the FORMAT_MESSAGE_FROM_SYSTEM flag to the FormatMessage function
|
111
|
+
in the get_description private method because it could sometimes return
|
112
|
+
bogus information. Thanks go to Greg Holmes for the spot.
|
113
|
+
* Added the string_inserts member to the EventLogStruct. This contains an
|
114
|
+
array of only the raw string inserts, rather than the entire text message.
|
115
|
+
|
116
|
+
== 0.4.2 - 6-Aug-2006
|
117
|
+
* Fixed a bug in the EventLog.read method related to the
|
118
|
+
EVENTLOG_BACKWARDS_READ flag.
|
119
|
+
* Fixed a bug in the EventLog.read method where the event_type was not being
|
120
|
+
set properly. Thanks go to "TheR" for the spot and the fix.
|
121
|
+
* Fixed bugs in the EventLog#tail method where it would fail if the log was
|
122
|
+
full and dups would appear.
|
123
|
+
|
124
|
+
== 0.4.1 - 28-May-2006
|
125
|
+
* Fixed a bug in the EventLog#notify_change method where the handle would
|
126
|
+
die after five or six reads. Thanks go to botp for the spot.
|
127
|
+
|
128
|
+
== 0.4.0 - 24-May-2006
|
129
|
+
* Now pure Ruby.
|
130
|
+
* Now includes a gemspec.
|
131
|
+
* Fixed a major bug the EventLog#tail method where it was reading the log in
|
132
|
+
the wrong order (!!!).
|
133
|
+
* Fixed a bug in the EventLog#report_event with regards to long category_id's.
|
134
|
+
Actually, this wasn't so much "fixed" as "avoided" by virtue of using a
|
135
|
+
pure Ruby solution.
|
136
|
+
* Added the EventLog#full? method.
|
137
|
+
* Documentation updates and corrections, including the tutorial on creating
|
138
|
+
and writing to your own event source.
|
139
|
+
|
140
|
+
== 0.3.3 - 2-Jan-2006
|
141
|
+
* If EventLog.new fails, it now raises EventLogError instead of StandardError.
|
142
|
+
* Added documentation to the eventlog.txt file for EventLog#notify_change.
|
143
|
+
* Added inline rdoc to the C source code.
|
144
|
+
* Code cleanup.
|
145
|
+
|
146
|
+
== 0.3.2 - 26-May-2005
|
147
|
+
* Code now more Unicode friendly, and other cleanup.
|
148
|
+
* Made the .txt files rdoc friendly, and removed the .rd files.
|
149
|
+
* Minor adjustments to the test suite.
|
150
|
+
|
151
|
+
=== 0.3.1 - 16-Feb-2005
|
152
|
+
* Minor modifications to the source to eliminate some warnings that appeared
|
153
|
+
in Ruby 1.8.2 or later, plus other minor tweaks.
|
154
|
+
* Renamed the sample programs and moved the 'examples' directory to the
|
155
|
+
toplevel directory.
|
156
|
+
* Made this document rdoc friendly.
|
157
|
+
|
158
|
+
== 0.3.0 - 30-Oct-2004
|
159
|
+
* Added the notify_change() and tail() methods.
|
160
|
+
* Added the write() alias for report_event().
|
161
|
+
* The read() class and instance methods now return an array of structs if
|
162
|
+
no block is given.
|
163
|
+
* Added the 'rubymsg.mc' message category file. If installed, this will
|
164
|
+
create a 'RubyMsg' event source for use with win32-service, though you
|
165
|
+
may use it for whatever you wish. See the README for more details.
|
166
|
+
* Renamed struct back to EventLogStruct - sorry, sorry - I promise I won't
|
167
|
+
change this again.
|
168
|
+
* Fixed a bug where using EventLog::SEEK_READ did not work properly (thanks
|
169
|
+
Park).
|
170
|
+
* Added the notify.rb test script under doc/examples.
|
171
|
+
|
172
|
+
== 0.2.5 - 28-Oct-2004
|
173
|
+
* Modified the open() and read() class methods to default to "Application"
|
174
|
+
for the default Event source.
|
175
|
+
* Removed the .html files. You can generate these on your own with rd2.
|
176
|
+
|
177
|
+
== 0.2.4 - 19-Oct-2004
|
178
|
+
* Fixed a bug where a segfault would result if an Event Log entry were
|
179
|
+
somehow corrupted. Thanks go again to Joey Gibson for the spot.
|
180
|
+
* Very minor doc corrections in tutorial.txt and eventlog.txt
|
181
|
+
|
182
|
+
== 0.2.3 - 14-Oct-2004
|
183
|
+
* Fixed a bug where some Event Log descriptions were returning nil instead
|
184
|
+
of the actual description. Thanks go to Joey Gibson for the spot.
|
185
|
+
* Minor test suite and doc additions, including a "future plan" that may
|
186
|
+
be of interest.
|
187
|
+
|
188
|
+
== 0.2.2 - 02-Jul-2004
|
189
|
+
* Fixed a bug in the read() method where not all the records were being
|
190
|
+
returned.
|
191
|
+
* Fixed calls to rb_time_new() - second argument appears to be mandatory as
|
192
|
+
of 1.8.2.
|
193
|
+
* Renamed struct returned by read() to "EventLog".
|
194
|
+
* Changed struct members "id" and "type" to "event_id" and "event_type",
|
195
|
+
respectively. This was to avoid any confusion with the builtin Ruby
|
196
|
+
methods of the same name.
|
197
|
+
* Replaced STR2CSTR() with StringValuePtr(), as the former is deprecated.
|
198
|
+
This means that as of this version, Ruby 1.8.0 or later is required.
|
199
|
+
* Moved the sample programs to doc/examples.
|
200
|
+
|
201
|
+
== 0.2.1 - 04-Mar-2004
|
202
|
+
* The add_event_source() and report_event() methods now accept symbols as
|
203
|
+
well as do key validation.
|
204
|
+
* Moved the EventLogError class under the Win32 module.
|
205
|
+
* Normalized the tc_eventlog.rb and tc_mc.rb scripts by making it easier to
|
206
|
+
run them standalone from another directory.
|
207
|
+
* Minor modification to the build process.
|
208
|
+
* Added a test_write.rb script for general futzing when it comes to creating
|
209
|
+
and writing events to the log.
|
210
|
+
* Doc updates, warranty information added.
|
211
|
+
|
212
|
+
== 0.2.0 - 1-Feb-2004
|
213
|
+
* Changed the Win32EventLogError class to just EventLogError. I felt the
|
214
|
+
Win32 was redundant given that the class is already under the Win32 module.
|
215
|
+
* Fixed bug where bogus error messages were returned because I was calling
|
216
|
+
GetLastError() too late.
|
217
|
+
* Fixed bug where error messages were getting cut off and/or garbled due to
|
218
|
+
\r\n character. (Thanks Park Heesob).
|
219
|
+
* Added open_backup class method.
|
220
|
+
|
221
|
+
== 0.1.4 - 16-Jan-2004
|
222
|
+
* Slightly better handling of the EventLog#close method. Adopted from code
|
223
|
+
previously submitted by Park Heesob.
|
224
|
+
* Fixed a bug in the (internal) GetUser() function that caused a segfault if
|
225
|
+
there were 250+ records. That function has been greatly simplified.
|
226
|
+
* Removed the rb_ensure() approach. What I thought was a memory leak was not,
|
227
|
+
in fact, a memory leak. Also, it was slowing down the method considerably.
|
228
|
+
* Minor test suite update.
|
229
|
+
|
230
|
+
== 0.1.3 - 7-Jan-2004
|
231
|
+
* Fixed memory leaks in read() method (Park Heesob).
|
232
|
+
* Added read() class method (Daniel Berger).
|
233
|
+
* Test suite and doc additions & updates
|
234
|
+
|
235
|
+
== 0.1.2 - 30-Nov-2003
|
236
|
+
* Added the report_event method. You can now write to the event log.
|
237
|
+
* Added the add_event_source class method, allowing you to register a custom
|
238
|
+
event source.
|
239
|
+
* Added the win32-mc package to the distribution. This is a simple
|
240
|
+
wrapper to generate .dll files from .mc files.
|
241
|
+
* Added Event Type constants
|
242
|
+
* Test suite additions
|
243
|
+
* Documentation updates and additions, including a small tutorial.
|
244
|
+
|
245
|
+
== 0.1.1 - 5-Nov-2003
|
246
|
+
* Fixed the free() call, and added implicit eventlog closing (when the
|
247
|
+
EventLog object is free'd).
|
248
|
+
* Simplified constants by removing 'EVENTLOG_' portion of name.
|
249
|
+
* Cleanup in the GetDescription() method, which was causing segfaults in
|
250
|
+
conjunction with TestUnit.
|
251
|
+
* Minor doc updates and cleanup.
|
252
|
+
|
253
|
+
== 0.1.0 - 14-Oct-2003
|
254
|
+
* Initial release
|