- vue@^2.3.0
- 中文文档(建设中)
- English(working)
1.in project path:
npm install vue-mobile-log
2.import:
import Vlog from 'vue-mobile-log'
Vue.use(Vlog);
//or
Vue.use(Vlog,options)
options:
{
env:'development',//when production does not open the console
level:'debug' //debug,info,warn,error
}
3.print log:
global call:
Vue.$vlog.debug(logMsg);
Vue.$vlog.info(logMsg);
Vue.$vlog.warn(logMsg);
Vue.$vlog.error(logMsg);
in component:
this.$vlog.debug(logMsg);
this.$vlog.info(logMsg);
this.$vlog.warn(logMsg);
this.$vlog.error(logMsg);
MIT