thor icon indicating copy to clipboard operation
thor copied to clipboard

Darren/chore/admin req logger

Open darrenvechain opened this issue 4 months ago • 1 comments

Description

allow dynamic change of API request logging:

image
  1. Start thor solo:
make thor; ./bin/thor solo --enable-admin
  1. Get the current setting:
curl http://127.0.0.1:2113/admin/apilogs
# {"enabled":false}
  1. Enable Logs:
curl http://127.0.0.1:2113/admin/apilogs -X POST -d '{"enabled":true}' # false to disable the logs

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] New and existing E2E tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules
  • [x] I have not added any vulnerable dependencies to my code

darrenvechain avatar Oct 01 '24 12:10 darrenvechain