Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

lightning: support dynamically modifying the log level #393

Merged
merged 2 commits into from
Sep 21, 2020

Conversation

kennytm
Copy link
Collaborator

@kennytm kennytm commented Sep 9, 2020

What problem does this PR solve?

Allows dynamically changing the log level after Lightning is started through an HTTP API, so we could instruct DBAs to switch view DEBUG-level logs on-demand.

What is changed and how it works?

Added the /loglevel API endpoint. Use

curl 'http://127.0.0.1:8287/loglevel' --data-binary '{"level":"debug"}'

to change the level.

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    • manually doing the /loglevel requests and observe the log output

Side effects

Related changes

  • Need to be included in the release note
    • Lightning's log level can be dynamically updated via HTTP

change the log level through the HTTP API
@kennytm kennytm added Should Update Docs Should update docs after this PR is merged. Remove this label once the docs are updated status/PTAL This PR is ready for review. Add this label back after committing new changes labels Sep 9, 2020
Copy link
Contributor

@glorv glorv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glorv glorv added status/LGT1 One reviewer already commented LGTM (LGTM1) and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Sep 10, 2020
@YuJuncen
Copy link
Contributor

LGTM

@YuJuncen YuJuncen added status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2) and removed status/LGT1 One reviewer already commented LGTM (LGTM1) labels Sep 21, 2020
@overvenus
Copy link
Member

/merge

@glorv
Copy link
Contributor

glorv commented Sep 21, 2020

/run-all-tests

@glorv glorv merged commit cc3f809 into master Sep 21, 2020
@glorv glorv deleted the kennytm/dynamic-log-level branch September 21, 2020 03:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Should Update Docs Should update docs after this PR is merged. Remove this label once the docs are updated status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants