Skip to content

Commit

Permalink
升级 log 支持多个参数
Browse files Browse the repository at this point in the history
  • Loading branch information
PengXing authored and chenqiushi committed Jan 15, 2019
1 parent 8be9ea4 commit 8b9bbce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mip/src/util/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const LIST = ['info', 'log', 'warn', 'error']
class Log {
constructor (name) {
LIST.forEach(item => {
this[item] = log => {
console[item](`[${name}] ${log}`)
this[item] = (...args) => {
console[item](`[${name}]`, ...args)
}
})
}
Expand Down

0 comments on commit 8b9bbce

Please sign in to comment.