egg-logaggregate

5.1.6 • Public • Published

egg-logaggregate

Aggregate egg logs into 2 categories: common logs and request logs.

Build Status NPM version code style: prettier Maintainability Test Coverage Known Vulnerabilities David deps npm download Git commit with emojis!

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.

/egg-logaggregate/

    Package Sidebar

    Install

    npm i egg-logaggregate

    Weekly Downloads

    1

    Version

    5.1.6

    License

    none

    Unpacked Size

    8.4 kB

    Total Files

    5

    Last publish

    Collaborators

    • jeff-tian