Skip to content

v1.1.2-beta.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@flxxyz flxxyz released this 12 May 18:30
· 105 commits to master since this release

日志扩展可导出方法

const danmaku = require('douyudm')
const logger = danmaku.logger
const dbname = 'some name'

//初始化日志
logger.init(dbname)

//写入日志
logger.echo(123)
logger.echo(true)
logger.echo('这是一段文本')
logger.echo([1, 2, 3])
logger.echo({a: 1, b: 2})

//导出日志,返回值为日志文本,web还另外弹出下载框以供下载
const text = logger.export()