All Projects → lluvio → Vue Logger

lluvio / Vue Logger

Licence: mit
log plugin for vuejs,vue 日志插件

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Vue Logger

Vue Music Player
🎵Vue.js写一个音乐播放器+📖One(一个).A music player + One by Vue.js
Stars: ✭ 729 (+5975%)
Mutual labels:  vue2
List Pull Loading
list-pull-loading是一个基于VUE实现的下拉刷新,上拉加载的组件。主使用IScroll(iscroll-probe)来实现,提供了项目中数据列表经常会用到的下拉提示信息、上拉提示信息、图片懒加载、回到顶部,其提示信息UI、内容可灵活配置,可使用提供的默认样式也可以自定义也可以隐藏。
Stars: ✭ 17 (+41.67%)
Mutual labels:  vue2
Jocs.github.io
💯Jocs 的个人博客,所有的文章都在 issues 里面
Stars: ✭ 840 (+6900%)
Mutual labels:  vue2
Easy Php
A Faster Lightweight Full-Stack PHP Framework 🚀
Stars: ✭ 754 (+6183.33%)
Mutual labels:  vue2
Vue2 Study
vue 的webpack配置,按需加载,element-ui,vuex
Stars: ✭ 16 (+33.33%)
Mutual labels:  vue2
Vue Entity Adapter
Package to maintain entities in Vuex.
Stars: ✭ 20 (+66.67%)
Mutual labels:  vue2
Vuejs Paginate
A Vue.js(v2.x+) component for creating pagination.
Stars: ✭ 697 (+5708.33%)
Mutual labels:  vue2
Fish Ui
A Vue.js 2.0 UI Toolkit for Web
Stars: ✭ 861 (+7075%)
Mutual labels:  vue2
Vue Chat
👥Vue全家桶+Socket.io+Express/Koa2打造一个智能聊天室。
Stars: ✭ 887 (+7291.67%)
Mutual labels:  vue2
Vue Konami Code
VueJS Konami code plugin
Stars: ✭ 26 (+116.67%)
Mutual labels:  vue2
Vue Snotify
Vuejs 2 Notification Center
Stars: ✭ 755 (+6191.67%)
Mutual labels:  vue2
Fuse
A simple file sharing web service in Vue.js and Flask
Stars: ✭ 7 (-41.67%)
Mutual labels:  vue2
Zhihu
django + vue 仿知乎
Stars: ✭ 24 (+100%)
Mutual labels:  vue2
Vue Koa Demo
🔰A simple full stack demo(CSR & SSR & Docker Support) written by Vue2 & Koa2(Koa1 verson also completed)
Stars: ✭ 730 (+5983.33%)
Mutual labels:  vue2
Vue Music
基于vue2.0的网易云音乐播放器,api来自于NeteaseCloudMusicApi,v2.0为最新版本
Stars: ✭ 855 (+7025%)
Mutual labels:  vue2
V Region
A simple region cascade selector, provide 4 levels Chinese administrative division data
Stars: ✭ 726 (+5950%)
Mutual labels:  vue2
Easy Vue
Learn vueJS Easily 👻
Stars: ✭ 896 (+7366.67%)
Mutual labels:  vue2
Vue2 Datatable
The best Datatable for Vue.js 2.x which never sucks. Give us a star 🌟 if you like it! (DEPRECATED. As I, @kenberkeley, the only maintainer, no longer works for OneWay. Bugs may be fixed but new features or breaking changes might not be merged. However, it's still the best in my mind because of its extremely flexible usage of dynamic components)
Stars: ✭ 867 (+7125%)
Mutual labels:  vue2
Vue Qq
🎨 Vue family bucket with socket.io and express/koa2 , create a web version of mobile QQ, supporting real-time group chat, real-time private chat, special care, shielding chat, smart IP geographic location, real-time display temperature and other QQ core functions
Stars: ✭ 861 (+7075%)
Mutual labels:  vue2
Mall Vue
基于Vue+Vuex+iView的电子商城网站
Stars: ✭ 929 (+7641.67%)
Mutual labels:  vue2

Vue logger

996.icu Ci Version License Downloads

文档(Document): English

适用于 vue 1.x 和 2.x

安装

npm install vue-logger --save

使用

引入

import vueLogger from "vue-logger";
Vue.use(vueLogger, {
  prefix: () => new Date(),
  dev: true,
  shortname: true,
  levels: ["log", "warn", "debug", "error", "dir"],
  forceLevels: []
});

调用

export default {
  mounted() {
    // 当 shortname 为 true 时, 默认为true
    this.$error("hello world");

    // 全局使用
    Vue.console.log("hello world");
  }
};

默认 levels ['log', 'warn', 'debug', 'error', 'dir'], 你可以额外添加,

Vue.use(vueLogger, { levels: ["info"] });

// 在组件中使用
this.$info("hello world");
// log依旧可以使用
this.$log("hello world");

关于shortname,默认是 true,如果不想要别名,可以这么调用

this.$console.log();

Options

Name Type Default Desc
prefix string None 日志前缀,可以通过 function动态添加
dev boolean true 日志开关,可选择在生产环境中关闭
shortname boolean true
levels array ['log', 'warn', 'debug', 'error', 'dir']
forceLevels array [] 无视 dev 的配置 强制打印

开发

# install deps
npm install

# build dist files
npm run build

# run all tests
npm test

TODO

  • [ ] sentry
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].