npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mini-vlog-report

v2.0.1

Published

小程序weData上报工具,优化的console,结构化日志

Downloads

126

Readme

mini-vlog-report [小程序实时日志上报]


简体中文 | English

这是什么?

mini-vlog-report 是一个封装了 wx.getRealtimeLogManager 方法的小程序(微信)上报工具。将上报能力抽象封装起来,同时本地日志台打印出来。 同时优化了console的使用,将更醒目的配色配置到不同类型的日志输出上,并提供了可定制的样式能力。 上报只需要通过调用 .report() 方法即可实现。同时可以在微信小程序后台WeData查看上报内容。

ps:单条日志最大长度是3000字节

如何使用

装载

  • npm
npm install mini-vlog-report --save
  • pnpm
pnpm install mini-vlog-report --save

使用

import vLog from "mini-vlog-report";

vLog.log('拥有console的所有用法')
vLog.log('同console.log使用 不做上报')
vLog.info('同console.info使用 不做上报')
vLog.log('report start', '第一个参数在控制台会有颜色输出').report()
vLog.log('obj test ', {a: 1, b: 2, c: 3}).report()
vLog.info('info', 1234, 'abc', this).report()
vLog.warn('warn', 123, '警告').report()
vLog.error('error', '错误').report()
vLog.log(null)
vLog.log(undefined)
vLog.log(NaN)

效果

计划完善

  • [√] 单条日志超过3k字节的拆分成多个 批次提交
  • [√] 提供自定义日志类型能力
  • [] 非微信小程序场景下的日志上报(默认平台)