Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.
/ winston-winlog2 Public archive

Windows Event Log logger for the node.js Winston module.

License

Notifications You must be signed in to change notification settings

peteward44/winston-winlog2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winston-winlog2

This project is no longer maintained

Windows Event Log logger for the node.js Winston module.

Exactly like the original winston-winlog, however uses coreybutler/node-windows instead of jfromaniello/windowseventlogjs so no native compiling using node-gyp is required. Also automatically pops up a UAC box if admin permissions are required.

Installation

$ npm install winston-winlog2
$ npm install winston

Usage

Configure :

  var winston = require('winston'),
      winlog = require("winston-winlog2");

  winston.add(winlog, { source: 'myapp' });

Then you can do:

  winston.info("this is an info message");
  winston.warning("this is an warning message");
  winston.error("this is an error message");

And you will see

2012-04-07_1148.png

Custom event log

When adding the transport you can define a custom event log as follows:

  winston.add(winlog, { source: 'myapp', eventLog: 'MyCustomEventLog' });

Then you will find your logs under "Applications and Services Logs"

2012-04-20_0904.png

How it works

This transport uses the module node-windows to log events.

The transport will do nothing (doesn't throw!) if you run it on a platform other than win32.

About

Windows Event Log logger for the node.js Winston module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published