Skip to content

Commit

Permalink
chore: tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
dpyzo0o committed Dec 30, 2019
1 parent 718d686 commit e07ad47
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,28 @@ const isDev = process.env.NODE_ENV === 'development';

export default {
info(...args: any[]) {
if (!log || isDev) {
if (isDev) {
return console.info(...args);
}
if (!log) {
return;
}
log.info(...args);
},
warn(...args: any[]) {
if (!log || isDev) {
if (isDev) {
return console.warn(...args);
}
if (!log) {
return;
}
log.warn(...args);
},
error(...args: any[]) {
if (!log || isDev) {
if (isDev) {
return console.error(...args);
}
if (!log) {
return;
}
log.error(...args);
Expand Down

0 comments on commit e07ad47

Please sign in to comment.