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

loglevel-mixin

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loglevel-mixin - npm Package Compare versions

Comparing version 1.6.18 to 1.6.19

6

package.json
{
"name": "loglevel-mixin",
"version": "1.6.18",
"version": "1.6.19",
"description": "mixin to declare logging methods named after a set of log levels",

@@ -22,3 +22,3 @@ "main": "dist/LogLevelMixin.js",

"engines": {
"node": ">=6.10.0"
"node": ">=7.7.2"
},

@@ -32,3 +32,3 @@ "devDependencies": {

"mocha": "^3.2.0",
"rollup": "^0.41.4",
"rollup": "^0.41.5",
"semantic-release": "^6.3.6",

@@ -35,0 +35,0 @@ "nyc": "^10.1.2"

@@ -89,3 +89,3 @@ [![npm](https://img.shields.io/npm/v/loglevel-mixin.svg)](https://www.npmjs.com/package/loglevel-mixin)

## loglevel-mixin.defineLoggerMethods(object, logLevels, theFunction) ⇒ <code>void</code>
## loglevel-mixin.defineLoggerMethods(object, logLevels, [theFunction]) ⇒ <code>undefined</code>
Adds logging methods to an existing object.

@@ -100,3 +100,3 @@ For each loglevel a method with the name of the log level will be created.

| logLevels | <code>object</code> | Hash with all the available loglevels. Stored by there name |
| theFunction | <code>function</code> | The function to be added under the loglevel name. This function will only be called if the current loglevel is greater equal the log level of the called logging function. By default a method log(level,message) will be used |
| [theFunction] | <code>function</code> | The function to be added under the loglevel name. This function will only be called if the current loglevel is greater equal the log level of the called logging function. By default a method log(level,message) will be used |

@@ -106,14 +106,14 @@

## loglevel-mixin.defineLogLevelProperties(object, logLevels, defaultLogLevel)
## loglevel-mixin.defineLogLevelProperties(object, [logLevels], [defaultLogLevel])
Declares two properties:
logLevel {String} `info`,`error`,...
logLevelPriority {Number}
logLevel {string} `info`,`error`,...
logLevelPriority {number}
**Kind**: static method of <code>[loglevel-mixin](#module_loglevel-mixin)</code>
| Param | Type | Description |
| --- | --- | --- |
| object | <code>object</code> | target where the properties will be written into |
| logLevels | <code>object</code> | Hash with all the available loglevels. Stored by there name; defaults to defaultLogLevels |
| defaultLogLevel | <code>string</code> | the default value for the properties; defaults to `info` |
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| object | <code>object</code> | | target where the properties will be written into |
| [logLevels] | <code>object</code> | <code>defaultLogLevels</code> | Hash with all the available loglevels. Stored by there name; defaults to defaultLogLevels |
| [defaultLogLevel] | <code>string</code> | <code>&quot;info&quot;</code> | the default value for the properties; defaults to `info` |

@@ -123,3 +123,3 @@

## loglevel-mixin.makeLogEvent(level, arg, args) ⇒ <code>object</code>
## loglevel-mixin.makeLogEvent(level, arg, [args]) ⇒ <code>object</code>
Helper function to aggregate values into a log event

@@ -134,3 +134,3 @@

| arg | <code>string</code> &#124; <code>object</code> | original log message - level and timestamp may be overwritten |
| args | <code>object</code> | additional values to be merged into the final log event - values have precedence |
| [args] | <code>object</code> | additional values to be merged into the final log event - values have precedence |

@@ -137,0 +137,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