egg-logaggregate
v5.1.6
Published
> Aggregate egg logs into 2 categories: common logs and request logs.
Downloads
38
Maintainers
Readme
egg-logaggregate
Aggregate egg logs into 2 categories: common logs and request logs.
Why?
Aggregate egg logs into 2 categories:
- common logs: common.json.log
- request logs: request.json.log
How?
It adds extra log transports which also append extra fields to the log file in json format:
- @env
- @timestamp
- @servername
- @region
- ...
Installation
npm install egg-logaggregate --save
Enable in your project:
In egg project's config/plugin.ts
export default const plugin: EggPlugin = {
//...
logaggregate: {
enable: true,
package: 'egg-logaggregate'
}
//...
}
Configuration/Customization:
This plugin is zero configuration, in other words, as soon as you installed and enabled it, then it works.