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

easelog

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easelog

An easy logging solution that saves to a file and displays on the console.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26
decreased by-82.67%
Maintainers
0
Weekly downloads
 
Created
Source

EaseLog

npm npm downloads npm

Installation

npx easelog init

The easelog init cli command downloads just the logger.ts and types.ts file. The best part about this is it allows you to make the project yours, you can adjust the logger the way you feel appropriate. If you do end up doing something you feel would help others, consider contributing!

Conventional (for Javascript projects)

npm i easelog

Usage

With file save

import { Logger } from "easelog"
const path = "" // where the log file is created
const log = new Logger(path)
log.info("Message", "Location")

Without file save

This is just unnecessary abstraction, but I did use chalk.js for colouring the logs to spice things up though

import { Logger } from "easelog"
const log = new Logger()
log.info("Message")
log.warn("Message")
log.error("Message", "Location")
log.debug("Message", "Location")

Note: location is optional

Types

Logger(path:string|undefined)

path is optional.

saveToFile(message: string, type:logType, location: string | undefined, path: string | undefined)

location and path are optional.

EaseLog CLI

Usage: easelog [options] [command]

Options:

  • -V, --version output the version number
  • -h, --help display help for command

Commands:

  • init [destination] clone logger.ts in your project; default destination is the current working directory
  • help [command] display help for command

More info

EaseLog does not support commonjs

Keywords

FAQs

Package last updated on 12 Nov 2024

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