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

log2file

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log2file

Simple node file logging module

  • 0.0.3-rfix
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

log2file

This is a simple module to save logs for your NodeJS application!

What's new in 0.0.3?

  1. All functions are now chainable!

    console.log('hello').warn('I am a warning!')
    
  2. Custom colored console logs.

    Usage:

    console.custom('Custom colored message', 'magenta')
    // Outputs magenta colored message in the console
    

    Valid colors:

    • black
    • red
    • yellow
    • blue
    • magenta
    • cyan
    • white
  3. New option to use! See below.

How to use :

  1. Install module using npm install log2file

  2. Require the module

    var logToFile = require('log2file')
    
  3. Initialize log2file

    logToFile(options)

    • options Object (required)
      • logFile String : Name of the log file, defaults to logfile.log
      • enableTime Boolean : Sets whether the log should contain time
      • logToConsole Boolean : Sets whether you want to show the log on console or just save it to the file
      • bright Boolean : Sets whether the console output should be bright or normal.
  4. That's it! Use console.log(), console.warn() and console.error() like you do always.

MIT (c) Akash Rajendra

I was supposed to be studying for my exams, but no. I made this instead.

Keywords

FAQs

Package last updated on 27 Aug 2017

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