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

oasis-std

Package Overview
Dependencies
Maintainers
20
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oasis-std - npm Package Compare versions

Comparing version 0.1.0-rc.38 to 0.1.0-rc.39

2

lib/src/logging.d.ts

@@ -10,3 +10,3 @@ import { BaseLogger as OasisLogger } from 'pino';

* Constructs a new logger named `name` with oasis-default configuration (JSON logs, UTC times, etc).
* The logging level is determiend via the OASIS_SDK_LOG_LEVEL variable, which is parsed as a simple
* The logging level is determined via the OASIS_SDK_LOG_LEVEL variable, which is parsed as a simple
* logging spec.

@@ -13,0 +13,0 @@ *

@@ -16,3 +16,14 @@ "use strict";

let logLevel = 'silent'; // default
const spec = (_a = process.env.OASIS_SDK_LOG_LEVEL) !== null && _a !== void 0 ? _a : '';
let spec = '';
/**
* Support both Browser and Node.js environment with the same syntax.
* `process` is not available natively in Browser. We catch the error, and rely on the default `''`.
* This way, Browser applications served via Webpack and other bundlers can utilze ENV variables too.
*/
try {
spec = (_a = process.env.OASIS_SDK_LOG_LEVEL) !== null && _a !== void 0 ? _a : '';
}
catch (_b) {
// ENV variable not present. Use default empty string.
}
for (const subspec of spec.split(',')) {

@@ -32,3 +43,3 @@ if (subspec === '') {

}
catch (_b) {
catch (_c) {
// A malformed regex, most likely. Ignore silently.

@@ -47,3 +58,3 @@ }

* Constructs a new logger named `name` with oasis-default configuration (JSON logs, UTC times, etc).
* The logging level is determiend via the OASIS_SDK_LOG_LEVEL variable, which is parsed as a simple
* The logging level is determined via the OASIS_SDK_LOG_LEVEL variable, which is parsed as a simple
* logging spec.

@@ -50,0 +61,0 @@ *

{
"name": "oasis-std",
"version": "0.1.0-rc.38",
"version": "0.1.0-rc.39",
"description": "Oasis platform standard library",

@@ -31,3 +31,3 @@ "license": "Apache-2.0",

},
"gitHead": "f7275f635d5238e8c9d21c1f3a623c774a1b2767"
"gitHead": "5560f6a932b2fe765c43bdc39936583d490a7fe5"
}

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