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

@poi/logger

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poi/logger - npm Package Compare versions

Comparing version 10.0.0 to 12.0.0-alpha.0

42

index.js

@@ -1,25 +0,33 @@

const util = require('util')
const LogHorizon = require('log-horizon')
const chalk = require('chalk')
class Logger extends LogHorizon {
inspect(title, obj) {
if (this.options.logLevel < 4) return
class Logger {
constructor(options) {
this.setOptions(options)
}
return this.debug(
title,
util.inspect(obj, {
depth: null,
colors: true
})
)
setOptions(options) {
this.options = Object.assign({}, this.options, options)
}
debug(title, message = '') {
return super.debug(`${chalk.inverse.bold.yellow(` ${title} `)} ${message}`)
log(...args) {
console.log(...args)
}
debug(...args) {
if (!this.options.debug) {
return
}
console.log(chalk.magenta.bold('===>'), ...args.map(str => chalk.bold(str)))
}
error(...args) {
console.error(chalk.red(args.join(' ')))
process.exitCode = process.exitCode || 1
}
success(...args) {
console.log(chalk.green('success'), ...args)
}
}
module.exports = new Logger({
logUpdate: false
})
module.exports = new Logger()
{
"name": "@poi/logger",
"version": "10.0.0",
"version": "12.0.0-alpha.0",
"files": [
"index.js"
],
"main": "index.js",
"publishConfig": {
"access": "public"
},
"files": [
"index.js"
],
"license": "MIT",
"repository": "https://github.com/egoist/poi/tree/master/packages/logger",
"dependencies": {
"chalk": "^2.3.2",
"log-horizon": "^0.1.2"
"chalk": "^2.4.1"
}
}
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