File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change 1+ /* eslint-disable no-console */
12import chalk from 'chalk'
23
34const Logger = {
4- log ( msg ) {
5- /* eslint-disable no-console */
6- return console . log ( chalk . green ( JSON . stringify ( msg ) ) )
7- /* eslint-enable no-console */
5+ log ( ...msg ) {
6+ return console . log ( chalk . green ( '[Info]' ) , ...msg )
87 } ,
9- error ( msg ) {
10- /* eslint-disable no-console */
11- return console . error ( chalk . bold . red ( JSON . stringify ( msg ) ) )
12- /* eslint-enable no-console */
8+ error ( ...msg ) {
9+ return console . error ( chalk . bold . red ( '[Error]' ) , ...msg )
1310 } ,
14- warn ( msg ) {
15- /* eslint-disable no-console */
16- return console . warn ( chalk . keyword ( 'orange' ) ( JSON . stringify ( msg ) ) )
17- /* eslint-enable no-console */
11+ warn ( ...msg ) {
12+ return console . warn ( chalk . keyword ( 'orange' ) ( '[Warn]' ) , ...msg )
13+ } ,
14+ debug ( ...msg ) {
15+ return console . warn ( chalk . blue ( '[Debug]' ) , ...msg )
1816 } ,
1917}
2018
You can’t perform that action at this time.
0 commit comments