windows-event-reader
A simple node module which wrap's the Get-WinEvent
powershell cmdlet. This wrapper will read events from the Windows Event Log.
Getting Started
Install this module by doing (on a Windows machine):
npm install windows-event-reader --save
Creating a WinEventReader
instance:
// You can change start and end time to be different, but incremental// checking for new events will be within a time window specified by frequencyvar winEvent = providers: 'node-event-reader Test Suite' startTime: Date endTime: Date frequency: 2000;
Getting Events
To get events going, create a new instance of WinEventReader which exposes an 'event emitter' like interface:
winEvent; winEvent; winEvent;
Log Objects:
Log objects from the data
event will contain a few fields:
id: 1000 providerName: 'node-event-reader Test Suite' // if available, the provide GUID providerId: null logName: 'Application' // if available, the processId processId: null // if available, the threadId threadId: undefined machineName: 'DESKTOP-1M76SII' // this is a Date object timeCreated: Mon Feb 22 2016 16:08:36 GMT- levelDisplayName: 'Information' message: 'Information2 Log'
Contributing
Contributions are always welcome! Please read the contributing guide before sending a pull-request.