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

kitten-logger

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kitten-logger - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## v0.2.2
*2022-11-28*
- Add an env var `KITTEN_LOGGER_DEST` to choose the destination.
## v0.2.1

@@ -2,0 +6,0 @@ *2022-09-01*

2

package.json
{
"name": "kitten-logger",
"version": "0.2.1",
"version": "0.2.2",
"description": "",

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

@@ -51,2 +51,5 @@ # kitten-logger

`KITTEN_LOGGER_IS_LOADED` | If `true`, kitten-logger will prefix all logs by `K_LOG` for sub instances of kitten-logger.
`KITTEN_LOGGER_DEST` | If `auto`, kitten-logger will write logs to the terminal if the process `process.stdout.fd` is a TTY if not, kitten-logger will write logs to the `out.log` file
| If `tty`, kitten-logger will write logs to the terminal
| If `file`, kitten-logger will write logs to the `out.log` file

@@ -53,0 +56,0 @@ ### Initialisation `kittenLogger.init`

@@ -15,2 +15,6 @@ const cluster = require('cluster');

function isTTYMode () {
return process.env.KITTEN_LOGGER_DEST === 'tty' || (tty.isatty(process.stdout.fd) && (process.env.KITTEN_LOGGER_DEST === 'auto' || !process.env.KITTEN_LOGGER_DEST));
}
module.exports = {

@@ -38,5 +42,5 @@ getTime () {

isTTY : tty.isatty(process.stdout.fd),
isTTY : isTTYMode(),
KITTEN_LOGGER_TAG : 'K_LOG'
};
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