# @licq/log

> 写本地日志

Latest version **1.0.1** (published 2022-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @licq/log
pnpm add @licq/log
yarn add @licq/log
bun add @licq/log
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-06-03 |
| First published | 2022-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ostwindli |
| Maintainers | uv-w |
| Keywords | nodejs, ostwindli, ostwind, log |

## Links

- npm: https://www.npmjs.com/package/@licq/log
- Repository: https://github.com/ostwindli/asenal
- Homepage: https://github.com/ostwindli/asenal#readme
- Issues: https://github.com/ostwindli/asenal/issues
- npm.io page: https://npm.io/package/@licq/log

## Dependencies (3)

- [open](https://npm.io/package/open.md) ^8.4.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [@licq/date](https://npm.io/package/@licq/date.md) ^1.0.5

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2022-06-03

## README

# @licq/log

写本地日志

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

[![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url]

[npm-image]: http://img.shields.io/npm/v/@licq/log.svg?style=flat-square
[npm-url]: http://npmjs.org/package/@licq/log
[download-image]: https://img.shields.io/npm/dm/@licq/log.svg?style=flat-square
[download-url]: https://npmjs.org/package/@licq/log

## 安装

```js
npm i --save-dev @licq/log
```

## API


### info 

打印info日志


**Returns**: null  
**Since**: v1.0.0  

| Param | Type |
| --- | --- |
| ...类似console.log参数 | <code>msg</code> | 

**Example**  
```js
const log = require('@licq/log')
const res = log.info(1, null, {}, true)
```
### info 

打印warn日志


**Returns**: null  
**Since**: v1.0.0  

| Param | Type |
| --- | --- |
| ...类似console.warn参数 | <code>msg</code> | 

**Example**  
```js
const log = require('@licq/log')
const res = log.warn(1, null, {}, true)
```
### info 

打印error日志


**Returns**: null  
**Since**: v1.0.0  

| Param | Type |
| --- | --- |
| ...类似console.error参数 | <code>msg</code> | 

**Example**  
```js
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**  
```js
const log = require('@licq/log')
log.openLogDir()
```
### cleanLogDir 

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


**Returns**: null  
**Since**: v1.0.0  
**Example**  
```js
const log = require('@licq/log')
log.cleanLogDir()
```

---
_Source: https://npm.io/package/@licq/log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
