Skip to content

Conversation

osmaczko
Copy link
Contributor

@osmaczko osmaczko commented Dec 3, 2024

This ensures waku node logs remain at INFO level, even if the global
logging level is set lower (e.g. DEBUG). To enable waku logs at a
specific level, one can execute:
wakuext_setLogNamespaces([{"logNamespaces": "wakunode:debug"}]).

iterates: status-im/status-desktop#16511

@osmaczko osmaczko self-assigned this Dec 3, 2024
@status-im-auto
Copy link
Member

status-im-auto commented Dec 3, 2024

Jenkins Builds

Click to see older builds (65)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3cf7dc7 #1 2024-12-03 23:04:27 ~4 min macos 📦zip
✔️ 3cf7dc7 #1 2024-12-03 23:04:52 ~4 min ios 📦zip
✔️ 3cf7dc7 #1 2024-12-03 23:04:57 ~5 min linux 📦zip
✔️ 3cf7dc7 #1 2024-12-03 23:05:55 ~5 min windows 📦zip
✔️ 3cf7dc7 #1 2024-12-03 23:05:59 ~6 min android 📦aar
✔️ 3cf7dc7 #1 2024-12-03 23:06:06 ~6 min tests-rpc 📄log
✔️ 3cf7dc7 #1 2024-12-03 23:09:06 ~9 min macos 📦zip
✔️ 3cf7dc7 #1 2024-12-03 23:30:29 ~30 min tests 📄log
✔️ 0148d3d #2 2024-12-04 10:33:49 ~4 min macos 📦zip
✔️ 0148d3d #2 2024-12-04 10:34:28 ~4 min windows 📦zip
✔️ 0148d3d #2 2024-12-04 10:35:46 ~6 min ios 📦zip
✔️ 0148d3d #2 2024-12-04 10:36:19 ~6 min linux 📦zip
✔️ 0148d3d #2 2024-12-04 10:36:48 ~7 min android 📦aar
✔️ 0148d3d #2 2024-12-04 10:37:36 ~8 min tests-rpc 📄log
✔️ 0148d3d #2 2024-12-04 10:37:50 ~8 min macos 📦zip
✖️ 0148d3d #2 2024-12-04 11:00:26 ~30 min tests 📄log
✔️ 566e9e1 #3 2024-12-04 11:14:19 ~4 min macos 📦zip
✔️ 566e9e1 #3 2024-12-04 11:14:47 ~5 min linux 📦zip
✔️ 566e9e1 #3 2024-12-04 11:15:34 ~5 min windows 📦zip
✔️ 566e9e1 #3 2024-12-04 11:15:39 ~5 min ios 📦zip
✔️ 566e9e1 #3 2024-12-04 11:17:09 ~7 min android 📦aar
✔️ 566e9e1 #3 2024-12-04 11:18:13 ~8 min macos 📦zip
✔️ 566e9e1 #3 2024-12-04 11:19:12 ~9 min tests-rpc 📄log
✖️ 566e9e1 #3 2024-12-04 11:39:44 ~29 min tests 📄log
✔️ 566e9e1 #4 2024-12-04 12:30:41 ~28 min tests 📄log
✖️ 0338f04 #5 2024-12-04 18:09:22 ~1 min tests 📄log
✖️ 0338f04 #6 2024-12-04 18:11:16 ~1 min tests 📄log
✔️ 0338f04 #4 2024-12-04 18:12:33 ~4 min windows 📦zip
✔️ 0338f04 #4 2024-12-04 18:12:39 ~5 min ios 📦zip
✔️ 0338f04 #4 2024-12-04 18:12:50 ~5 min macos 📦zip
✔️ 0338f04 #4 2024-12-04 18:13:23 ~5 min linux 📦zip
✖️ 0338f04 #4 2024-12-04 18:14:02 ~6 min tests-rpc 📄log
✔️ 0338f04 #4 2024-12-04 18:14:35 ~7 min android 📦aar
✔️ 0338f04 #5 2024-12-04 18:16:37 ~4 min windows 📦zip
✔️ 0338f04 #4 2024-12-04 18:16:39 ~9 min macos 📦zip
✔️ 0338f04 #5 2024-12-04 18:17:37 ~4 min macos 📦zip
✔️ 0338f04 #5 2024-12-04 18:18:49 ~6 min ios 📦zip
✔️ 0338f04 #5 2024-12-04 18:19:02 ~5 min linux 📦zip
✖️ 0338f04 #5 2024-12-04 18:19:48 ~5 min tests-rpc 📄log
✔️ 0338f04 #5 2024-12-04 18:21:05 ~6 min android 📦aar
✔️ 0338f04 #5 2024-12-04 18:24:38 ~7 min macos 📦zip
✔️ 0338f04 #6 2024-12-05 14:24:10 ~4 min ios 📦zip
✔️ 0338f04 #6 2024-12-05 14:24:19 ~4 min macos 📦zip
✔️ 0338f04 #6 2024-12-05 14:25:26 ~5 min windows 📦zip
✔️ 0338f04 #6 2024-12-05 14:25:30 ~5 min linux 📦zip
✔️ 0338f04 #6 2024-12-05 14:25:43 ~5 min tests-rpc 📄log
✔️ 0338f04 #6 2024-12-05 14:26:00 ~6 min android 📦aar
✔️ 0338f04 #6 2024-12-05 14:29:24 ~9 min macos 📦zip
✔️ 0338f04 #7 2024-12-05 14:48:36 ~28 min tests 📄log
✔️ c7e3c34 #7 2024-12-05 19:36:10 ~4 min ios 📦zip
✔️ c7e3c34 #7 2024-12-05 19:36:16 ~4 min windows 📦zip
✔️ c7e3c34 #7 2024-12-05 19:36:18 ~4 min macos 📦zip
✔️ c7e3c34 #7 2024-12-05 19:37:41 ~5 min linux 📦zip
✔️ c7e3c34 #7 2024-12-05 19:38:14 ~6 min android 📦aar
✔️ c7e3c34 #7 2024-12-05 19:38:24 ~6 min tests-rpc 📄log
✔️ c7e3c34 #7 2024-12-05 19:41:40 ~9 min macos 📦zip
✔️ c7e3c34 #8 2024-12-05 20:01:36 ~29 min tests 📄log
✔️ 61c9e83 #8 2024-12-06 11:13:27 ~4 min windows 📦zip
✔️ 61c9e83 #8 2024-12-06 11:14:07 ~4 min macos 📦zip
✔️ 61c9e83 #8 2024-12-06 11:14:20 ~5 min ios 📦zip
✔️ 61c9e83 #8 2024-12-06 11:15:08 ~5 min linux 📦zip
✔️ 61c9e83 #8 2024-12-06 11:15:42 ~6 min android 📦aar
✔️ 61c9e83 #8 2024-12-06 11:15:43 ~6 min tests-rpc 📄log
✔️ 61c9e83 #8 2024-12-06 11:19:15 ~9 min macos 📦zip
✔️ 61c9e83 #9 2024-12-06 11:38:49 ~29 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✖️ e4ec091 #10 2025-08-06 11:43:43 ~1 min tests 📄log
✔️ e4ec091 #9 2025-08-06 11:45:23 ~2 min android 📦aar
✔️ e4ec091 #9 2025-08-06 11:45:28 ~2 min macos 📦zip
✔️ e4ec091 #9 2025-08-06 11:45:31 ~3 min linux 📦zip
✔️ e4ec091 #9 2025-08-06 11:46:56 ~4 min ios 📦zip
✔️ e4ec091 #9 2025-08-06 11:47:32 ~4 min macos 📦zip
✔️ e4ec091 #9 2025-08-06 11:50:27 ~7 min tests-rpc 📄log
✔️ e4ec091 #9 2025-08-06 11:51:01 ~8 min windows 📦zip
✔️ e4ec091 #1 2025-08-06 11:52:36 ~10 min linux 📦zip
✔️ 28a0a4d #10 2025-08-06 11:48:00 ~2 min android 📦aar
✔️ 28a0a4d #10 2025-08-06 11:48:42 ~3 min linux 📦zip
✔️ 28a0a4d #10 2025-08-06 11:49:52 ~4 min macos 📦zip
✔️ 28a0a4d #10 2025-08-06 11:52:14 ~5 min ios 📦zip
✔️ 28a0a4d #10 2025-08-06 11:53:19 ~5 min macos 📦zip
✔️ 28a0a4d #2 2025-08-06 11:54:57 ~10 min linux 📦zip
✔️ 28a0a4d #10 2025-08-06 11:57:35 ~6 min windows 📦zip
✔️ 28a0a4d #10 2025-08-06 11:57:50 ~7 min tests-rpc 📄log
✔️ 28a0a4d #11 2025-08-06 12:09:21 ~24 min tests 📄log

defer func() {
elapsed := time.Since(start)
d.log.Info(fmt.Sprintf("Loading records from the DB took %s", elapsed))
d.log.Debug(fmt.Sprintf("Loading records from the DB took %s", elapsed))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
d.log.Debug(fmt.Sprintf("Loading records from the DB took %s", elapsed))
d.log.Debug("loaded records from DB", zap.Duration("duration", elapsed))

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.68%. Comparing base (5aac429) to head (28a0a4d).

Files with missing lines Patch % Lines
wakuv2/gowaku.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6164      +/-   ##
===========================================
- Coverage    58.83%   58.68%   -0.16%     
===========================================
  Files          826      826              
  Lines       124458   124458              
===========================================
- Hits         73225    73038     -187     
- Misses       43564    43774     +210     
+ Partials      7669     7646      -23     
Flag Coverage Δ
functional 29.17% <40.00%> (-1.20%) ⬇️
unit 55.36% <60.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
wakuv2/message_publishing.go 82.27% <100.00%> (ø)
wakuv2/gowaku.go 65.04% <50.00%> (-0.49%) ⬇️

... and 51 files with indirect coverage changes

@osmaczko osmaczko force-pushed the chore/reduce-waku-logs-spam branch 2 times, most recently from 0148d3d to 566e9e1 Compare December 4, 2024 11:09
@osmaczko osmaczko force-pushed the chore/reduce-waku-logs-spam branch from 566e9e1 to 0338f04 Compare December 4, 2024 18:07
@osmaczko osmaczko changed the base branch from develop to feat/integrate-categorized-logging December 4, 2024 18:07
@osmaczko osmaczko changed the title chore(logging)_: avoid logging spam by 3rd parties chore(logging)_: default waku node logs to INFO level Dec 4, 2024
richard-ramos
richard-ramos previously approved these changes Dec 4, 2024
Copy link
Member

@richard-ramos richard-ramos left a comment

Choose a reason for hiding this comment

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

🚀

@richard-ramos
Copy link
Member

cc: @ilmotta as it's gonna be necessary to add a checkbox or something in mobile to enable waku debug level logs with wakuext_setLogNamespaces.

node.WithTopicHealthStatusChannel(waku.topicHealthStatusChan),
node.WithKeepAlive(randomPeersKeepAliveInterval, allPeersKeepAliveInterval),
node.WithLogger(logger),
node.WithLogger(logger.Named("wakunode")),
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to refer to namespaces we need to hardcode using constants.

@ilmotta
Copy link
Contributor

ilmotta commented Dec 4, 2024

Issue created for Mobile status-im/status-mobile#21758. Thanks for tagging me @richard-ramos

igor-sirotin
igor-sirotin previously approved these changes Dec 4, 2024
Base automatically changed from feat/integrate-categorized-logging to develop December 5, 2024 14:19
@osmaczko osmaczko force-pushed the chore/reduce-waku-logs-spam branch from 0338f04 to c7e3c34 Compare December 5, 2024 19:31
@osmaczko osmaczko force-pushed the chore/reduce-waku-logs-spam branch from c7e3c34 to 61c9e83 Compare December 6, 2024 11:09
@osmaczko osmaczko force-pushed the chore/reduce-waku-logs-spam branch from 61c9e83 to e4ec091 Compare August 6, 2025 11:42
@osmaczko osmaczko requested a review from igor-sirotin August 6, 2025 11:42
This ensures waku node logs remain at INFO level, even if the global
logging level is set lower (e.g. DEBUG). To enable waku logs at a
specific level, one can execute:
`wakuext_setLogNamespaces([{"logNamespaces": "wakunode:debug"}])`.

iterates: status-im/status-desktop#16511
@osmaczko osmaczko force-pushed the chore/reduce-waku-logs-spam branch from e4ec091 to 28a0a4d Compare August 6, 2025 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Code Review

Development

Successfully merging this pull request may close these issues.

7 participants