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

wickrio-bot-api

Package Overview
Dependencies
Maintainers
3
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wickrio-bot-api - npm Package Compare versions

Comparing version 5.96.1 to 5.96.2

4

package.json
{
"name": "wickrio-bot-api",
"version": "5.96.1",
"version": "5.96.2",
"description": "The official Wickr IO Bot API Framework",

@@ -12,3 +12,3 @@ "main": "src/WickrIOBot.js",

"winston": "^3.3.3",
"winston-daily-rotate-file": "^3.10.0"
"winston-daily-rotate-file": "^4.5.5"
},

@@ -15,0 +15,0 @@ "devDependencies": {

@@ -7,2 +7,3 @@ const fs = require('fs')

const logDir = 'logs'
const npmLogLevels = ['error', 'warn', 'info', 'http', 'verbose', 'debug', 'silly']

@@ -16,5 +17,17 @@ class WickrLogger {

const logTokens = JSON.parse(process.env.log_tokens)
level = logTokens.LOG_LEVEL
maxSize = logTokens.LOG_FILE_SIZE
maxFiles = logTokens.LOG_MAX_FILES
if (typeof logTokens.LOG_LEVEL === 'string' && npmLogLevels.includes(logTokens.LOG_LEVEL)) {
level = logTokens.LOG_LEVEL
} else {
console.error(`${logTokens.LOG_LEVEL} is not a valid NPM log level. Log level set to ${level}`)
}
if (typeof logTokens.LOG_FILE_SIZE === 'string' && !isNaN(parseFloat(logTokens.LOG_FILE_SIZE))) {
maxSize = logTokens.LOG_FILE_SIZE
} else {
console.error(`${logTokens.LOG_FILE_SIZE} is not a valid max file size. Max file size set to ${maxSize}`)
}
if (typeof logTokens.LOG_MAX_FILES === 'string' && !isNaN(parseFloat(logTokens.LOG_MAX_FILES))) {
maxFiles = logTokens.LOG_MAX_FILES
} else {
console.error(`${logTokens.LOG_MAX_FILES} is not a valid number of files. Max number of files set to ${maxSize}`)
}
}

@@ -26,2 +39,3 @@ if (!fs.existsSync(logDir)) {

const rotateTransport = new DailyRotateFile({

@@ -63,2 +77,3 @@ filename: path.join(logDir, 'log'),

this.logger = winston.createLogger(logConfiguration)
this.logger.info(`WickrLogger setup with Log Level: ${level}, Max File Size: ${maxSize}, and Max Number of files: ${maxFiles}`)
}

@@ -65,0 +80,0 @@

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