mentie 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ const should_log = levels => {
8
8
  const loglevel = env.loglevel()
9
9
 
10
10
  // Check if the loglevel matches this call
11
- const valid_levels = [ 'chatter', 'info', 'warn', 'error' ]
11
+ const valid_levels = [ 'debug', 'info', 'warn', 'error' ]
12
12
 
13
13
  // Check if the loglevel is valid
14
14
  if( !valid_levels.includes( loglevel ) ) console.warn( `Invalid log level: ${ loglevel }` )
@@ -120,13 +120,13 @@ export function log( ...messages ) {
120
120
 
121
121
  /**
122
122
  * Extremely verbose logs that you should probably never use.
123
- * Only logs if ?loglevel= or LOG_LEVEL= is set to: 'chatter'
123
+ * Only logs if ?loglevel= or LOG_LEVEL= is set to: 'debug'
124
124
  * 🎯 Goal: log extremely verbose messages that you probably don't want to see
125
125
  */
126
- log.chatter = function( ...messages ) {
126
+ log.debug = function( ...messages ) {
127
127
 
128
128
  // Check if the loglevel matches this call
129
- const levels = [ 'chatter' ]
129
+ const levels = [ 'debug' ]
130
130
 
131
131
  // Log the messages if the loglevel matches
132
132
  if( should_log( levels ) ) {
@@ -153,7 +153,7 @@ log.chatter = function( ...messages ) {
153
153
  log.info = function( ...messages ) {
154
154
 
155
155
  // Check if the loglevel matches this call
156
- const levels = [ 'info', 'chatter' ]
156
+ const levels = [ 'info', 'debug' ]
157
157
 
158
158
  // Log the messages if the loglevel matches
159
159
  if( env.is_emulator() || should_log( levels ) ) {
@@ -178,7 +178,7 @@ log.info = function( ...messages ) {
178
178
  log.warn = function( ...messages ) {
179
179
 
180
180
  // Check if the loglevel matches this call
181
- const levels = [ 'warn', 'info', 'chatter' ]
181
+ const levels = [ 'warn', 'info', 'debug' ]
182
182
 
183
183
  // Log the messages if the loglevel matches
184
184
  if( dev || should_log( levels ) ) {
@@ -203,7 +203,7 @@ log.warn = function( ...messages ) {
203
203
  log.error = function( ...messages ) {
204
204
 
205
205
  // Check if the loglevel matches this call
206
- const levels = [ 'error', 'warn', 'info', 'chatter' ]
206
+ const levels = [ 'error', 'warn', 'info', 'debug' ]
207
207
  if( !should_log( levels ) ) return
208
208
 
209
209
  // Annotate the provided messages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mentie",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Mentor's toolbelt",
5
5
  "type": "module",
6
6
  "main": "index.js",