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

status-logger

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

status-logger - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

tests.js

18

index.js
var singleLineLog = require('single-line-log')
module.exports = function (opts) {
if (!opts) opts = {}
var logger = getLogger(opts)

@@ -10,17 +11,6 @@

var LOG_INTERVAL = (opts.logspeed ? +opts.logspeed : 200)
if (isNaN(LOG_INTERVAL)) LOG_INTERVAL = 200
setInterval(function () {
print()
}, LOG_INTERVAL)
print()
process.on('exit', function (code) {
if (code !== 1) print()
})
return {
message: message,
status: status
status: status,
print: print
}

@@ -40,3 +30,3 @@

function print () {
logger.stdout() // Clear old stdout before printing messages
// logger.stdout() // Clear old stdout before printing messages
while (true) {

@@ -43,0 +33,0 @@ if (messageQueue.length === 0) break

{
"name": "status-logger",
"version": "1.0.0",
"version": "2.0.0",
"description": "print updating progress to console and stdout",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -12,3 +12,3 @@

```
```javascript
var statusLogger = require('status-logger')

@@ -30,4 +30,10 @@

log.status('Overwrite line 1', 1)
setInterval(function () {
log.print() // print on interval
}, 500)
```
### `log.print()`: print status + messages
### `log.message(msg)`: log a message

@@ -39,4 +45,3 @@

* `logspeed`: interval for printing
* `quiet`: do not print anything
* `debug`: print everything to console.log or console.error
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