# @lingxiteam/engine-plog

> ## 网络日志记录 debugPrinter.networklog/debugPrinter.networkfinish

Latest version **4.3.2-alpha.0** (published 2025-11-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lingxiteam/engine-plog
pnpm add @lingxiteam/engine-plog
yarn add @lingxiteam/engine-plog
bun add @lingxiteam/engine-plog
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.3.2-alpha.0 |
| Published | 2025-11-03 |
| First published | 2023-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 63.3 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | LimMem |
| Maintainers | limanpm, wanerrr, mishi-brother, hammersjs, zhang.guoyong, zzzzjq, diyc, goulili, pengyh, wujian666, taiyangteng, cenxiaolian, xiaohuoni, duan_duan, yaozanwen, brinkr, babelczx |

## Links

- npm: https://www.npmjs.com/package/@lingxiteam/engine-plog
- npm.io page: https://npm.io/package/@lingxiteam/engine-plog

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) 4.17.21
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) 7.28.2
- [@lingxiteam/types](https://npm.io/package/@lingxiteam/types.md) 4.3.2-alpha.0

## Recent versions

- 4.3.2-alpha.0 (latest) — 2025-11-03
- 4.3.1-alpha.61 — 2025-10-31
- 4.3.1-alpha.60 — 2025-10-31
- 4.1.1-beta.10 — 2025-09-22
- 4.3.1-alpha.50 — 2025-06-19
- 4.3.1-alpha.4 — 2025-04-29
- 4.3.1-alpha.1 — 2025-01-05
- 4.1.1-alpha.10 — 2024-11-22
- 4.1.1-alpha.9 — 2024-11-22
- 4.1.1-alpha.8 — 2024-11-19
- 4.1.1-beta.3 — 2024-11-08
- 4.2.1-alpha.10 — 2024-11-07
- 4.1.1-beta.2 — 2024-11-02
- 4.1.1-alpha.5 — 2024-09-03
- 4.1.1-alpha.4 — 2024-08-30
- … 77 more at https://npm.io/package/@lingxiteam/engine-plog/versions

## README

# 日志管理库内置的共享topic（事件）如下，请其他模块按此要求调用：

## 网络日志记录 debugPrinter.networklog/debugPrinter.networkfinish

开始时间/结束时间会由plog库内置按照networklog或networkfinish自行处理

```javascript
// 请求发起时
LogManager.trigger('debugPrinter.networklog', {
    reqSeq, // 请求的标识,必传，当触发networkfinish时需要以此来寻找对应请求，请求标识不限格式，也可以是某个自增序列，但需要保证唯一
    url, // 网络请求地址
    options, // 本次请求的fetch设置对象，包括method、header、param这些东西，供网络工具二次处理
    cmddata: { // 如果本次网络请求是由指令发起，可以传入额外的信息（用于定位是哪条指令），非必传
        cmd, // 本条指令记录对象
        appId, // 这些ID用于定位是哪个页面
        pageId,
        busiCompId,
    }
});

// 请求完成时
LogManager.trigger('debugPrinter.networkfinish', {
    reqSeq, // 请求的标识,必传，以对应发起时的请求 
    resultData,// 请求结果的数据,
    resultCode,// 请求结果状态，'success'或'error',
});
```

## 指令系统输出错误信息 cmdplayer.errorMsg

通用。指令系统本身输出的错误信息会统一抛出该事件。具体页面运行态监听这个事件来决定是弹出错误信息弹窗还是什么

```javascript
LogManager.trigger('cmdplayer.errorMsg', { ...errorOptions });
```

## 指令系统执行引擎日志信息 cmdplayer.engineMsg

指令系统自身执行引擎产生信息时抛出。注意，符合`cmdplayer.errorMsg`的错误信息在此处也会重复抛出一次（暂定）
指令的“打印日志”则自行处理console.log

```javascript
LogManager.trigger('cmdplayer.engineMsg', { msg: any, cmd, type: 'info'|'warning'|'error' });
```

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