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

darla

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

darla

An easy to use logger

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

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

Simple logger to both console and file and levels with no dependencies.

Usage:

Install

npm i darla

OR

yarn add darla

Import

const darla = require("darala)

Log debug:

dara.debug("this is debug message")

Log info:

darla.info("New order", order)

Log warning:

darla.warn("This could lead to an error in the future" + "fix now")

Log error:

darla.error(err)

Change path to log file output:

darla.setLogFilePath("/Users/alice/logs/project.log")

Modify config:

darla.modifyConfig("console", "error", false)

Set log level:

darla.setLevel("file", "error")

Potential levels: debug, info, warn, error, off

Default config:

let config = {
  console : {
    debug : true,
    info : true,
    warn : true,
    error : true
  },
  file : {
    debug : true,
    info : true,
    warn : true,
    error : true
  }
}

FAQs

Package last updated on 13 Jan 2022

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