@licq/log

1.0.1 • Public • Published

@licq/log

写本地日志

目录:path.join(os.tmpdir(), 'lcq/log')

NPM version NPM downloads

安装

npm i --save-dev @licq/log

API

info

打印info日志

Returns: null
Since: v1.0.0

Param Type
...类似console.log参数 msg

Example

const log = require('@licq/log')
const res = log.info(1, null, {}, true)

info

打印warn日志

Returns: null
Since: v1.0.0

Param Type
...类似console.warn参数 msg

Example

const log = require('@licq/log')
const res = log.warn(1, null, {}, true)

info

打印error日志

Returns: null
Since: v1.0.0

Param Type
...类似console.error参数 msg

Example

const log = require('@licq/log')
const res = log.error(1, null, {}, true)

openLogDir

打开日志目录、降级则是临时目录 path.join(os.tmpdir(), lcq/log)

Returns: null
Since: v1.0.0
Example

const log = require('@licq/log')
log.openLogDir()

cleanLogDir

清空日志目录 path.join(os.tmpdir(), lcq/log)

Returns: null
Since: v1.0.0
Example

const log = require('@licq/log')
log.cleanLogDir()

Package Sidebar

Install

npm i @licq/log

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

4.92 kB

Total Files

4

Last publish

Collaborators

  • uv-w