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

@deephaven/log

Package Overview
Dependencies
Maintainers
4
Versions
783
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deephaven/log - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

29

dist/DefaultLogger.js

@@ -17,7 +17,32 @@ var __extends = (this && this.__extends) || (function () {

import Logger from './Logger';
import { INFO } from './LoggerLevel';
import LoggerLevel, { DEBUG2, INFO, SILENT } from './LoggerLevel';
/**
* Get the default log level to use.
* production mode defaults to INFO.
* development mode defaults to DEBUG2 (most verbose).
* test mode defaults to SILENT.
* Override by setting environment variable `process.env.DEEPHAVEN_LOG_LEVEL`
* @returns {number} The default log level to use
*/
function getDefaultLevel() {
var envValue = process.env.DEEPHAVEN_LOG_LEVEL;
if (envValue && LoggerLevel[envValue]) {
return LoggerLevel[envValue];
}
var envLevel = parseInt(envValue !== null && envValue !== void 0 ? envValue : '', 10);
if (!Number.isNaN(envLevel)) {
return envLevel;
}
if (process.env.NODE_ENV === 'test') {
return SILENT;
}
if (process.env.NODE_ENV === 'development') {
return DEBUG2;
}
return INFO;
}
var DefaultLogger = /** @class */ (function (_super) {
__extends(DefaultLogger, _super);
function DefaultLogger(level) {
if (level === void 0) { level = INFO; }
if (level === void 0) { level = getDefaultLevel(); }
var _this = _super.call(this, null, level) || this;

@@ -24,0 +49,0 @@ _this.modules = {};

@@ -0,1 +1,2 @@

export const SILENT: -1;
export const ERROR: 0;

@@ -7,2 +8,3 @@ export const WARN: 1;

declare var _default: Readonly<{
SILENT: number;
ERROR: number;

@@ -9,0 +11,0 @@ WARN: number;

@@ -0,1 +1,2 @@

export var SILENT = -1;
export var ERROR = 0;

@@ -7,2 +8,3 @@ export var WARN = 1;

export default Object.freeze({
SILENT: SILENT,
ERROR: ERROR,

@@ -9,0 +11,0 @@ WARN: WARN,

5

package.json
{
"name": "@deephaven/log",
"version": "0.1.0",
"version": "0.1.1",
"description": "Deephaven Logger",

@@ -31,3 +31,2 @@ "author": "Deephaven Data Labs LLC",

"start": "cross-env NODE_ENV=development npm run watch",
"prepublishOnly": "run-s build",
"test": "jest --watch",

@@ -60,3 +59,3 @@ "test:ci": "jest --ci",

},
"gitHead": "2decc54a35c8765c4c1527e5159c3f7a0e7dff06"
"gitHead": "087d3c2c4eb1e261a1897ce5dd394aeb99ebd7b8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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