@@ -191,7 +191,7 @@ const utils = {
191191 _level : 3 ,
192192 _colors : [
193193 chalk . hex ( '#64B3FF' ) , chalk . grey , chalk . hex ( '#FFA500' ) ,
194- chalk . hex ( '#0070BB' ) , chalk . hex ( '#48BB31' ) , chalk . hex ( '#BBBB23' ) , chalk . hex ( '#FF0006' )
194+ chalk . hex ( '#0070BB' ) , chalk . hex ( '#48BB31' ) , chalk . hex ( '#BFFF00' ) , chalk . hex ( '# BBBB23') , chalk . hex ( '#FF0006' )
195195 ] ,
196196 _iso_time : ( ) => new Date ( Date . now ( ) + 288e5 ) . toISOString ( ) . slice ( 0 , - 1 ) + '+08' ,
197197 _cache : [ ] ,
@@ -231,7 +231,7 @@ const utils = {
231231 process . stdout . write ( status_bar ) ;
232232 } ,
233233 debug ( context , msg ) {
234- if ( this . _level > 3 ) {
234+ if ( this . _level >= 4 ) {
235235 if ( msg instanceof Object ) msg = JSON . stringify ( msg , null , 4 ) ;
236236 let color_text_pair = [
237237 [ this . _colors [ 0 ] , `[${ this . _iso_time ( ) } ]` ] ,
@@ -243,7 +243,7 @@ const utils = {
243243 }
244244 } ,
245245 info ( context , msg ) {
246- if ( this . _level > 2 ) {
246+ if ( this . _level >= 3 ) {
247247 let color_text_pair = [
248248 [ this . _colors [ 0 ] , `[${ this . _iso_time ( ) } ]` ] ,
249249 [ this . _colors [ 1 ] , '[Info]' ] ,
@@ -254,25 +254,37 @@ const utils = {
254254 this . proPrint ( color_text_pair . map ( ( [ color , text ] ) => color ( text ) ) ) ;
255255 }
256256 } ,
257+ notice ( context , msg ) {
258+ if ( this . _level >= 2 ) {
259+ let color_text_pair = [
260+ [ this . _colors [ 0 ] , `[${ this . _iso_time ( ) } ]` ] ,
261+ [ this . _colors [ 1 ] , '[Notice]' ] ,
262+ [ this . _colors [ 2 ] , `[帐号${ process . env [ 'NUMBER' ] } ${ context } ]` ] ,
263+ [ this . _colors [ 5 ] , `[${ msg } ]` ] ,
264+ ] ;
265+ this . _cache . push ( color_text_pair . map ( it => it [ 1 ] ) . join ( ' ' ) ) ;
266+ this . proPrint ( color_text_pair . map ( ( [ color , text ] ) => color ( text ) ) ) ;
267+ }
268+ } ,
257269 warn ( context , msg ) {
258- if ( this . _level > 1 ) {
270+ if ( this . _level >= 1 ) {
259271 let color_text_pair = [
260272 [ this . _colors [ 0 ] , `[${ this . _iso_time ( ) } ]` ] ,
261273 [ this . _colors [ 1 ] , '[Warn]' ] ,
262274 [ this . _colors [ 2 ] , `[帐号${ process . env [ 'NUMBER' ] } ${ context } ]` ] ,
263- [ this . _colors [ 5 ] , `[\n${ msg } \n]` ] ,
275+ [ this . _colors [ 6 ] , `[\n${ msg } \n]` ] ,
264276 ] ;
265277 this . _cache . push ( color_text_pair . map ( it => it [ 1 ] ) . join ( ' ' ) ) ;
266278 this . proPrint ( color_text_pair . map ( ( [ color , text ] ) => color ( text ) ) ) ;
267279 }
268280 } ,
269281 error ( context , msg ) {
270- if ( this . _level > 0 ) {
282+ if ( this . _level >= 0 ) {
271283 let color_text_pair = [
272284 [ this . _colors [ 0 ] , `[${ this . _iso_time ( ) } ]` ] ,
273285 [ this . _colors [ 1 ] , '[Error]' ] ,
274286 [ this . _colors [ 2 ] , `[帐号${ process . env [ 'NUMBER' ] } ${ context } ]` ] ,
275- [ this . _colors [ 6 ] , `[\n${ msg } \n]` ] ,
287+ [ this . _colors [ 7 ] , `[\n${ msg } \n]` ] ,
276288 ] ;
277289 this . _cache . push ( color_text_pair . map ( it => it [ 1 ] ) . join ( ' ' ) ) ;
278290 this . proPrint ( color_text_pair . map ( ( [ color , text ] ) => color ( text ) ) ) ;
@@ -475,7 +487,7 @@ const utils = {
475487 } ) ;
476488 } ) ;
477489 } ,
478- getIpInfo ( ) {
490+ getIpInfo ( ) {
479491 return new Promise ( ( resolve ) => {
480492 send ( {
481493 url : 'https://myip.qq.com/' ,
0 commit comments