Skip to content

Commit

Permalink
docs(logger): add logger.outputJSON to docs (#3425)
Browse files Browse the repository at this point in the history
add logger.outputJSON to docs in both Chinese and English
  • Loading branch information
friskfly authored and Maledong committed Feb 4, 2019
1 parent 86fe598 commit f76c230
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/source/en/core/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ exports.logger = {
};
```

## Format
Use JSON as the output log format, make it easier to parse.
```js
// config/config.${env}.js
exports.logger = {
outputJSON: true,
};
```

## Log Level

Logs are designed in 5 levels, including `NONE`, `DEBUG`, `INFO`, `WARN` and `ERROR`. For inspecting in development, they will also be written into files and printed into terminal as well.
Expand Down
9 changes: 9 additions & 0 deletions docs/source/zh-cn/core/logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ exports.logger = {
};
```

## 日志文件格式
设置输出格式为JSON,方便日志监控系统分析
```js
// config/config.${env}.js
exports.logger = {
outputJSON: true,
};
```

## 日志级别

日志分为 `NONE``DEBUG``INFO``WARN``ERROR` 5 个级别。
Expand Down

0 comments on commit f76c230

Please sign in to comment.