Skip to content
Logs all requests made to p2p and api endpoints
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
lib
.eslintignore
.eslintrc
.gitignore
LICENCE
README.md
jest.config.js
package.json
yarn.lock

README.md

Ark Detective Plugin

This plugin logs all incoming requests made to P2P and API plugins.

⚠️ This plugin logs a lot of messages ⚠️

Due to logging a lot of things we suggest you modify the settings for the winston logger otherwise you might not have logs that will be few days old.

Installation

Clone

cd ~/ark-core/plugins
git clone https://github.com/deadlock-delegate/detective
lerna bootstrap

Registration

Open ~/.ark/config/plugins.js and add the following at the end (it has to be bellow p2p and api).

'@deadlock/detective': {}

like so:

module.exports = {
  '@arkecosystem/core-event-emitter': {},
  '@arkecosystem/core-config': {},
  ...
  '@deadlock/detective': {},  // this is the newly added line
}

Configuration

module.exports = {
  '@arkecosystem/core-event-emitter': {},
  '@arkecosystem/core-config': {},
  ...
  '@deadlock/detective': {
    api: false, // include api request logs (default: true)
    excludeIPs: ['127.0.0.1'], // exclude requests from these IPs (default: [])
    headers: false, // log the headers (default: true)
    p2p: false, // include p2p request logs (default: true)
    payload: false, // log the POST/PUT/PATCH payloads (default: true)
    requestID: true, // show the requestID (default: false)
  },
}

Credits

License

MIT © roks0n

You can’t perform that action at this time.