Socket
Socket
Sign inDemoInstall

strapi-utils

Package Overview
Dependencies
Maintainers
8
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-utils - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

23

lib/logger.js

@@ -10,12 +10,21 @@ 'use strict';

const logLevels = ['fatal', 'error', 'warn', 'info', 'debug', 'trace'];
const logLevels = Object.keys(pino.levels.values);
function getLogLevel() {
if (
_.isString(process.env.STRAPI_LOG_LEVEL) &&
_.includes(logLevels, process.env.STRAPI_LOG_LEVEL.toLowerCase())
) {
return process.env.STRAPI_LOG_LEVEL;
if (!_.isString(process.env.STRAPI_LOG_LEVEL)) {
// Default value.
return 'debug';
}
return 'debug';
const logLevel = process.env.STRAPI_LOG_LEVEL.toLowerCase();
if (!_.includes(logLevels, logLevel)) {
throw new Error(
"Invalid log level set in STRAPI_LOG_LEVEL environment variable. Accepted values are: '" +
logLevels.join("', '") +
"'."
);
}
return logLevel;
}

@@ -22,0 +31,0 @@

{
"name": "strapi-utils",
"version": "3.2.1",
"version": "3.2.2",
"description": "Shared utilities for the Strapi packages",

@@ -48,3 +48,3 @@ "homepage": "http://strapi.io",

"license": "SEE LICENSE IN LICENSE",
"gitHead": "5a77b560e333604d052bfa83ad774769b5d6bc2e"
"gitHead": "b3d0b7219852bf61c0b0c6eeee9462f112d99189"
}
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