-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(logging)_: enable runtime logs configuration #6210
Open
osmaczko
wants to merge
1
commit into
develop
Choose a base branch
from
chore/setup-logging-at-runtime
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+99
−27
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add endpoints for log level and namespaces configuration to `status.go` and deprecate equivalents from service. Endpoints are defined in `status.go`, as it has access to `statusBackend`, the only entity capable of manipulating node configuration without requiring a restart.
Jenkins Builds
|
Functional test results: Running pytest with args: ['-p', 'vscode_pytest', '--status_backend_urls=http://localhost:42995', '--rootdir=/path/to/status-go/tests-functional', '/path/to/status-go/tests-functional/tests/test_logging.py::TestLogging::test_logging']
============================= test session starts ==============================
platform linux -- Python 3.11.9, pytest-6.2.4, py-1.11.0, pluggy-0.13.1 -- /bin/python
cachedir: .pytest_cache
rootdir: /path/to/status-go/tests-functional, configfile: pytest.ini
plugins: dependency-0.6.0
collecting ... collected 1 item
tests/test_logging.py::TestLogging::test_logging
-------------------------------- live log call ---------------------------------
INFO root:status_backend.py:39 Sending POST request to url http://localhost:42995/statusgo/InitializeApplication with data: {
"apiLogging": true,
"dataDir": "/tmp/pytest-of-myself/pytest-85/test_logging0",
"logEnabled": true,
"logLevel": "DEBUG"
}
INFO root:signals.py:121 Connection opened
WARNING websocket:_logging.py:66 websocket connected
INFO root:status_backend.py:41 Got response: b'{"accounts":null,"centralizedMetricsInfo":{"enabled":false,"userConfirmed":false}}'
INFO root:status_backend.py:47 Got response: b'{"accounts":null,"centralizedMetricsInfo":{"enabled":false,"userConfirmed":false}}'
INFO root:status_backend.py:39 Sending POST request to url http://localhost:42995/statusgo/CreateAccountAndLogin with data: {
"customizationColor": "primary",
"displayName": "Mr_Meeseeks",
"kdfIterations": 256000,
"logEnabled": true,
"logLevel": "DEBUG",
"password": "Strong12345",
"rootDataDir": "/tmp/pytest-of-myself/pytest-85/test_logging0"
}
INFO root:status_backend.py:41 Got response: b'{"error":""}'
INFO root:status_backend.py:47 Got response: b'{"error":""}'
INFO root:status_backend.py:39 Sending POST request to url http://localhost:42995/statusgo/SetLogLevel with data: {
"logLevel": "ERROR"
}
INFO root:status_backend.py:41 Got response: b'{"error":""}'
INFO root:status_backend.py:47 Got response: b'{"error":""}'
INFO root:status_backend.py:39 Sending POST request to url http://localhost:42995/statusgo/SetLogNamespaces with data: {
"logNamespaces": "test1.test2:debug,test1.test2.test3:info"
}
INFO root:status_backend.py:41 Got response: b'{"error":""}'
INFO root:status_backend.py:47 Got response: b'{"error":""}'
INFO root:rpc.py:54 Sending POST request to url http://localhost:42995/statusgo/CallRPC with data: {
"id": null,
"jsonrpc": "2.0",
"method": "wakuext_logTest"
}
INFO root:rpc.py:58 Got response: {
"id": null,
"jsonrpc": "2.0",
"result": null
}
INFO root:status_backend.py:39 Sending POST request to url http://localhost:42995/statusgo/Logout with data: {}
INFO root:status_backend.py:41 Got response: b'{"error":""}'
INFO root:status_backend.py:47 Got response: b'{"error":""}'
INFO root:status_backend.py:39 Sending POST request to url http://localhost:42995/statusgo/LoginAccount with data: {
"kdfIterations": 256000,
"keyUid": "0x42d81d7344e88629b9bf94536a732680683a8a0f42d1422cf8f24a0b5699bdb7",
"password": "Strong12345"
}
INFO root:status_backend.py:41 Got response: b'{"error":""}'
INFO root:status_backend.py:47 Got response: b'{"error":""}'
INFO root:rpc.py:54 Sending POST request to url http://localhost:42995/statusgo/CallRPC with data: {
"id": null,
"jsonrpc": "2.0",
"method": "wakuext_logTest"
}
INFO root:rpc.py:58 Got response: {
"id": null,
"jsonrpc": "2.0",
"result": null
}
PASSED
============================== 1 passed in 12.55s ==============================
Finished running tests!
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6210 +/- ##
===========================================
- Coverage 61.27% 61.24% -0.03%
===========================================
Files 833 833
Lines 109910 109949 +39
===========================================
- Hits 67348 67340 -8
- Misses 34711 34757 +46
- Partials 7851 7852 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add endpoints for log level and namespaces configuration to
status.go
and deprecate equivalents from service.Endpoints are defined in
status.go
, as it has access tostatusBackend
, the only entity capable of manipulating node configuration without requiring a restart.