Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

windows-event-reader

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windows-event-reader

A reader for Windows Event Log and ETW

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

windows-event-reader

Build status

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 frequency
var winEvent = new WinEventReader({
    providers: ['node-event-reader Test Suite'],
    startTime: new Date(Date.now()),
    endTime: new Date(Date.now()),
    frequency: 2000
});

Getting Events

To get events going, create a new instance of WinEventReader which exposes an 'event emitter' like interface:

winEvent.on('data', logObjects => {
    // logObjects is an Array
    logObjects.forEach(logObject => {
        console.dir(logObject);
    });
});

winEvent.on('error', err => {
    console.error(err);
});

winEvent.on('end', () => {
    console.log('event reader stopped');
});

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-0800 (Pacific Standard Time), 
  levelDisplayName: 'Information', 
  message: 'Information2 Log' 
}

Contributing

Contributions are always welcome! Please read the contributing guide before sending a pull-request.

Keywords

FAQs

Package last updated on 24 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc