Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cn): translate src/content/api/logging.md #754

Merged
merged 3 commits into from
Jun 20, 2020
Merged

docs(cn): translate src/content/api/logging.md #754

merged 3 commits into from
Jun 20, 2020

Conversation

wangjq4214
Copy link

翻译 src/content/api/logging.md

@wangjq4214 wangjq4214 closed this Jun 15, 2020
@wangjq4214 wangjq4214 reopened this Jun 15, 2020
@netlify
Copy link

netlify bot commented Jun 15, 2020

Deploy preview for cn-webpack ready!

Built with commit 752329d

https://deploy-preview-754--cn-webpack.netlify.app

@wangjq4214
Copy link
Author

@QC-L

@QC-L QC-L mentioned this pull request Jun 17, 2020
49 tasks
@@ -1,53 +1,53 @@
---
title: Logger Interface
title: Logger API
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请不要修改原标题

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
title: Logger API
title: Logger 接口


webpack logger is available to [loaders](/loaders/) and [plugins](/api/plugins/#logging). Emitting as part of the [Stats](/api/stats/) and configured by the user in [webpack configuration](/configuration/).
Webpack Logger 可以用在 [loaders](/loaders/) [plugins](/api/plugins/#logging)。生成的 Logger 将作为 [统计信息](/api/stats/) 的一部分进行输出,并且用户可以使用 [webpack configuration](/configuration/) 对 Logger 进行配置。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Webpack Logger 可以用在 [loaders](/loaders/)[plugins](/api/plugins/#logging)。生成的 Logger 将作为 [统计信息](/api/stats/) 的一部分进行输出,并且用户可以使用 [webpack configuration](/configuration/) Logger 进行配置。
Webpack Logger 可以用在 [loaders](/loaders/)[plugins](/api/plugins/#logging)。生成的 Logger 将作为 [统计信息](/api/stats/) 的一部分进行输出,并且用户可以在 [webpack 配置文件](/configuration/) 中对 Logger 进行配置。

- CLI, UI tools for webpack may choose different ways to display logging
- webpack core can emit logging output, e.g. timing data
- 可以 [配置](/configuration/stats/#statslogging) 日志的显示级别
- Logging 记录可作为 `stats.json` 的一部分输出
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Logging 记录可作为 `stats.json` 的一部分输出
- 日志内容可作为 `stats.json` 的一部分输出

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging 没必要保留关键字吧?建议翻译为日志

- webpack core can emit logging output, e.g. timing data
- 可以 [配置](/configuration/stats/#statslogging) 日志的显示级别
- Logging 记录可作为 `stats.json` 的一部分输出
- 统计预设可以设置 Logging 的输出
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 统计预设可以设置 Logging 的输出
- 统计预设会影响日志的输出

Copy link
Member

@QC-L QC-L Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

affect -> 影响
和设置无关吧?
意译?

- 可以 [配置](/configuration/stats/#statslogging) 日志的显示级别
- Logging 记录可作为 `stats.json` 的一部分输出
- 统计预设可以设置 Logging 的输出
- plugins 可以设置 Logging 的捕获与显示级别
Copy link
Member

@QC-L QC-L Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- plugins 可以设置 Logging 的捕获与显示级别
- 使用 plugins 可以影响日志的捕获及展示级别

- Logging 记录可作为 `stats.json` 的一部分输出
- 统计预设可以设置 Logging 的输出
- plugins 可以设置 Logging 的捕获与显示级别
- 当使用多个 plugins 和 loaders 时,提供更加通用的日志记录解决方案
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 当使用多个 plugins 和 loaders 时,提供更加通用的日志记录解决方案
- 当使用多个 plugins 和 loaders 时,建议提供更加通用的日志记录解决方案

- When using multiple plugins and loaders they use a common logging solution
- CLI, UI tools for webpack may choose different ways to display logging
- webpack core can emit logging output, e.g. timing data
- 可以 [配置](/configuration/stats/#statslogging) 日志的显示级别
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 可以 [配置](/configuration/stats/#statslogging) 日志的显示级别
- 可以 [配置](/configuration/stats/#statslogging) 日志的展示级别

- 统计预设可以设置 Logging 的输出
- plugins 可以设置 Logging 的捕获与显示级别
- 当使用多个 plugins 和 loaders 时,提供更加通用的日志记录解决方案
- 基于 Webpack 开发的 CLI、UI 工具等可能会选择不同的方式来显示 Logging
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 基于 Webpack 开发的 CLI、UI 工具等可能会选择不同的方式来显示 Logging
- 基于 Webpack 开发的 CLI、UI 工具等可能会选择不同的方式来展示日志

- plugins 可以设置 Logging 的捕获与显示级别
- 当使用多个 plugins loaders 时,提供更加通用的日志记录解决方案
- 基于 Webpack 开发的 CLI、UI 工具等可能会选择不同的方式来显示 Logging
- Webpack 核心可以生成日志进行输出,例如:timing data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Webpack 核心可以生成日志进行输出,例如:timing data
- Webpack 核心可以触发日志输出,例如:timing data


W> __Avoid noise in the log!__ Keep in mind that multiple plugins and loaders are used together. Loaders are usually processing multiple files and are invoked for every file. Choose a logging level as low as possible to keep the log output informative.
W> __避免在日志中输出无效信息!__请记住,多个 plugins 和 loader 经常一起使用。Loader 通常处理多个文件,并且每个文件都会调用,所以选择一个尽可能低的 logging 级别以保证 log 的信息量。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
W> __避免在日志中输出无效信息!__请记住,多个 plugins 和 loader 经常一起使用。Loader 通常处理多个文件,并且每个文件都会调用,所以选择一个尽可能低的 logging 级别以保证 log 的信息量。
W> __避免在日志中输出无效信息!__请记住,多个 plugin 和 loader 经常一起使用。loader 通常处理多个文件,并且每个文件都会调用,所以尽可能选择较低的日志级别以保证 log 的信息量。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文的英文不需要单复数

@wangjq4214
Copy link
Author

@QC-L 已经进行修改

@QC-L QC-L merged commit 0175524 into docschina:cn Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants