
Security News
Open VSX Unblocks Extension IDs Used in Malware Campaign
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.
@better-mini/logger
Advanced tools
小程序真机调试/预览 Logger 组件,支持输出日志到屏幕进行查看,提升调试效率。
注:目前仅支持 Taro 3.0
安装
npm install @better-mini/logger
使用
import React from 'react'
import Logger from '@better-mini/logger'
import '@better-mini/logger/dist/index.less'
const Page = () => {
const handleLog = () => {
Logger.log('Hello')
}
const handleError = () => {
Logger.error('Ops, an error occurred.')
}
return (
<View className={styles.page}>
<View className={styles.btn} onClick={handleLog}>
点击 log 一下
</View>
<View className={styles.btn} onClick={handleError}>
点击 error 一下
</View>
<Logger visible beautify max={100} height={600} />
</View>
)
}
Logger 继承至 View,因此 View 的 className style 等 prop 均支持
| 属性 | 可选 | 类型 | 默认值 | 释义 |
|---|---|---|---|---|
visible | 是 | boolean | true | 是否渲染 |
expand | 是 | boolean | true | 是否展开 |
beautify | 是 | boolean | true | 是否格式化 JSON 数据,便于阅读 |
max | 是 | number | 30 | 最多展示多少日志,超过时最早的日志会被删除 |
height | 是 | number | 400 | 组件高度 |
输出普通日志
参数:arg1 [, arg2, ..., argN] :any
输出错误日志
参数:arg1 [, arg2, ..., argN] :any
FAQs
Taro Logger 组件 React 版,用于真机中日志输出和查看。
We found that @better-mini/logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.

Product
Socket is bringing experimental protection to Firefox, scanning 97,000+ extensions in Mozilla's official directory for malware and risky updates.