New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

loggingtofile

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

loggingtofile

Logging to a file.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

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

loggingtofile

An easy way to log to a file. Makes it very easy to override console.log(). I hope to add support for different structures, e.g. HTML lists, Markdown, csv, tables, etc. Suggestions are welcome.

Installation

npm install loggingtofile

Usage

var Loggingtofile = require('Loggingtofile');

// Instantiate. Tell the module the path of your log file.
var logger = new Loggingtofile('output.txt');

// Log to the file 'output.txt'
logger.log('This is a log message.');

// Override console.log
console.log = logger.log;

// Will be logged to the 'output.txt' file
console.log('This is a console.log message.');

Output

Thu Feb 20 2014 18:05:08 GMT+1100 (EST): This is a log message.
Thu Feb 20 2014 18:05:08 GMT+1100 (EST): This is a console.log message

Keywords

FAQs

Package last updated on 20 Feb 2014

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