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

elecpen

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elecpen

a simple logger

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

ElecPen travis

A simple logger

Options

OptionDescription
infoFileFile name for logging info and verbose
errFileFile name for logging error and warning
logToConsoleWrite to console too
timestampAdd timestamp for an entry
appendIf file exists, append new entries to it instead of truncating

Methods

  • logger.verbose
  • logger.info
  • logger.warning
  • logger.error

How to use?

var opts = {
  infoFile: 'info.log',  // record info and verbose
  errFile: 'err.log', // record error and warning
  logToConsole: true,
  timestamp: true, // default to true
  append: true // default to true
};
var fs = requrie('http');
var logger = require('logger').createLogger(opts);

http.createServer(function(req, res) {
  logger.info('Recieve a request. Path: %s', req.path);
  res.end('Hello world.');
})
.listen(4000, function() {
  logger.info('Server listening...');
});

Keywords

FAQs

Package last updated on 23 Jun 2015

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