New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lalog

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lalog - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

4

CHANGELOG.md
# Changelog
### 0.8.1
- Fix: Allow undefined to be passed to setLevel()
### 0.8.0

@@ -4,0 +8,0 @@

6

dist/index.d.ts

@@ -46,5 +46,7 @@ declare const levels: readonly ["trace", "info", "warn", "error", "fatal", "security"];

/**
* Change the minimum level to write logs
* Change the minimum level to write logs.
* @param newLevelName - If falsy it will just return the current level
* @returns The previous level
*/
static setLevel(newLevelName: LevelType): LevelType;
static setLevel(newLevelName?: LevelType): LevelType;
/**

@@ -51,0 +53,0 @@ * Parse the Express request (req) object for logging

@@ -66,6 +66,11 @@ "use strict";

/**
* Change the minimum level to write logs
* Change the minimum level to write logs.
* @param newLevelName - If falsy it will just return the current level
* @returns The previous level
*/
static setLevel(newLevelName) {
const previousLevel = Logger.getLevel();
if (!newLevelName) {
return previousLevel;
}
const newLevelIndex = levels.indexOf(newLevelName);

@@ -72,0 +77,0 @@ if (newLevelIndex >= 0) {

@@ -137,6 +137,11 @@ import uuid from 'uuid';

/**
* Change the minimum level to write logs
* Change the minimum level to write logs.
* @param newLevelName - If falsy it will just return the current level
* @returns The previous level
*/
static setLevel(newLevelName: LevelType): LevelType {
static setLevel(newLevelName?: LevelType): LevelType {
const previousLevel = Logger.getLevel();
if (!newLevelName) {
return previousLevel;
}
const newLevelIndex = levels.indexOf(newLevelName);

@@ -143,0 +148,0 @@ if (newLevelIndex >= 0) {

@@ -21,3 +21,3 @@ {

"eslint-plugin-import": "2.18.2",
"eslint-plugin-jest": "23.0.5",
"eslint-plugin-jest": "23.1.0",
"eslint-plugin-security": "1.4.0",

@@ -61,3 +61,3 @@ "jest": "24.9.0",

"types": "dist/index.d.ts",
"version": "0.8.0"
"version": "0.8.1"
}

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