status-go icon indicating copy to clipboard operation
status-go copied to clipboard

chore_: replace geth logger with zap logger

Open osmaczko opened this issue 1 year ago • 6 comments

iterates: status-im/status-desktop#16536

osmaczko avatar Oct 17 '24 13:10 osmaczko

Jenkins Builds

Click to see older builds (123)
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_multiplication_x: 93229bd2 #1 2024-10-17 13:30:41 ~3 min tests :page_facing_up:log
:heavy_check_mark: 93229bd2 #1 2024-10-17 13:31:59 ~4 min linux :package:zip
:heavy_check_mark: 93229bd2 #1 2024-10-17 13:32:37 ~5 min ios :package:zip
:heavy_check_mark: 93229bd2 #1 2024-10-17 13:32:49 ~5 min android :package:aar
:heavy_check_mark: 93229bd2 #1 2024-10-17 13:33:02 ~5 min tests-rpc :page_facing_up:log
:heavy_check_mark: 48618807 #2 2024-10-17 13:39:15 ~1 min android :package:aar
:heavy_check_mark: 48618807 #2 2024-10-17 13:39:58 ~2 min linux :package:zip
:heavy_check_mark: 48618807 #2 2024-10-17 13:40:34 ~3 min ios :package:zip
:heavy_check_mark: 48618807 #2 2024-10-17 13:42:46 ~5 min tests-rpc :page_facing_up:log
:heavy_check_mark: 48618807 #2 2024-10-17 14:10:34 ~33 min tests :page_facing_up:log
:heavy_check_mark: c232d64e #3 2024-10-17 18:33:06 ~1 min android :package:aar
:heavy_check_mark: c232d64e #3 2024-10-17 18:33:50 ~2 min linux :package:zip
:heavy_check_mark: c232d64e #3 2024-10-17 18:34:28 ~3 min ios :package:zip
:heavy_check_mark: c232d64e #3 2024-10-17 18:36:23 ~5 min tests-rpc :page_facing_up:log
:heavy_check_mark: c232d64e #3 2024-10-17 19:03:15 ~31 min tests :page_facing_up:log
:x: c3565a28 #4 2024-10-18 10:23:17 ~11 sec linux :page_facing_up:log
:x: c3565a28 #4 2024-10-18 10:23:57 ~54 sec ios :page_facing_up:log
:x: c3565a28 #4 2024-10-18 10:23:57 ~55 sec android :page_facing_up:log
:heavy_multiplication_x: c3565a28 #4 2024-10-18 10:25:13 ~2 min tests :page_facing_up:log
:heavy_multiplication_x: c3565a28 #4 2024-10-18 10:25:20 ~2 min tests-rpc :page_facing_up:log
:x: e7831298 #5 2024-10-18 10:30:38 ~13 sec linux :page_facing_up:log
:x: e7831298 #5 2024-10-18 10:31:14 ~53 sec ios :page_facing_up:log
:x: e7831298 #5 2024-10-18 10:31:14 ~55 sec android :page_facing_up:log
:heavy_multiplication_x: e7831298 #5 2024-10-18 10:32:21 ~1 min tests :page_facing_up:log
:heavy_multiplication_x: e7831298 #5 2024-10-18 10:32:27 ~2 min tests-rpc :page_facing_up:log
:x: 6c785440 #6 2024-10-22 14:26:55 ~1 min ios :page_facing_up:log
:x: 6c785440 #6 2024-10-22 14:27:50 ~2 min android :page_facing_up:log
:x: 6c785440 #6 2024-10-22 14:28:04 ~2 min linux :page_facing_up:log
:heavy_multiplication_x: 6c785440 #6 2024-10-22 14:28:26 ~2 min tests-rpc :page_facing_up:log
:heavy_multiplication_x: 6c785440 #6 2024-10-22 14:28:53 ~3 min tests :page_facing_up:log
:heavy_multiplication_x: fa91335d #7 2024-10-22 14:47:08 ~1 min tests :page_facing_up:log
:heavy_multiplication_x: fa91335d #7 2024-10-22 14:49:40 ~4 min tests-rpc :page_facing_up:log
:heavy_check_mark: fa91335d #7 2024-10-22 14:49:59 ~4 min ios :package:zip
:heavy_check_mark: fa91335d #7 2024-10-22 14:50:20 ~5 min android :package:aar
:heavy_check_mark: fa91335d #7 2024-10-22 14:50:23 ~5 min linux :package:zip
:heavy_multiplication_x: 8699c3de #8 2024-10-22 14:50:41 ~53 sec tests-rpc :page_facing_up:log
:heavy_multiplication_x: 8699c3de #8 2024-10-22 14:52:24 ~3 min tests :page_facing_up:log
:heavy_check_mark: 8699c3de #8 2024-10-22 14:52:43 ~2 min android :package:aar
:heavy_check_mark: 8699c3de #8 2024-10-22 14:53:15 ~2 min linux :package:zip
:heavy_check_mark: 8699c3de #8 2024-10-22 14:54:05 ~3 min ios :package:zip
:heavy_multiplication_x: 3c8337a9 #9 2024-10-22 15:41:03 ~2 min tests :page_facing_up:log
:heavy_check_mark: 3c8337a9 #9 2024-10-22 15:41:46 ~3 min ios :package:zip
:heavy_check_mark: 3c8337a9 #9 2024-10-22 15:42:31 ~3 min linux :package:zip
:heavy_check_mark: 3c8337a9 #9 2024-10-22 15:44:21 ~5 min android :package:aar
:heavy_multiplication_x: 3c8337a9 #9 2024-10-22 15:45:10 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: adcd51b8 #10 2024-10-22 15:53:20 ~3 min android :package:aar
:heavy_check_mark: adcd51b8 #10 2024-10-22 15:54:20 ~3 min linux :package:zip
:heavy_check_mark: adcd51b8 #10 2024-10-22 15:55:14 ~4 min ios :package:zip
:heavy_multiplication_x: adcd51b8 #10 2024-10-22 15:56:50 ~6 min tests-rpc :page_facing_up:log
:heavy_multiplication_x: adcd51b8 #10 2024-10-22 16:22:50 ~32 min tests :page_facing_up:log
:heavy_check_mark: b661b982 #11 2024-10-22 17:18:17 ~2 min android :package:aar
:heavy_check_mark: b661b982 #11 2024-10-22 17:18:40 ~2 min linux :package:zip
:heavy_check_mark: b661b982 #11 2024-10-22 17:19:17 ~3 min ios :package:zip
:heavy_multiplication_x: b661b982 #11 2024-10-22 17:22:13 ~6 min tests-rpc :page_facing_up:log
:heavy_multiplication_x: b661b982 #11 2024-10-22 17:47:42 ~31 min tests :page_facing_up:log
:heavy_check_mark: d0bfc0cb #12 2024-10-22 19:00:26 ~2 min android :package:aar
:heavy_check_mark: d0bfc0cb #12 2024-10-22 19:00:59 ~3 min ios :package:zip
:heavy_check_mark: d0bfc0cb #12 2024-10-22 19:01:05 ~3 min linux :package:zip
:heavy_multiplication_x: d0bfc0cb #12 2024-10-22 19:04:08 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: d0bfc0cb #12 2024-10-22 19:30:51 ~32 min tests :page_facing_up:log
:heavy_check_mark: 07a87847 #13 2024-10-22 19:41:55 ~2 min android :package:aar
:heavy_check_mark: 07a87847 #13 2024-10-22 19:42:10 ~2 min linux :package:zip
:heavy_check_mark: 07a87847 #13 2024-10-22 19:42:33 ~3 min ios :package:zip
:heavy_check_mark: 07a87847 #13 2024-10-22 19:46:47 ~7 min tests-rpc :page_facing_up:log
:heavy_check_mark: 5153ffbd #14 2024-10-22 19:45:36 ~3 min android :package:aar
:heavy_check_mark: 5153ffbd #14 2024-10-22 19:45:55 ~3 min linux :package:zip
:heavy_check_mark: 5153ffbd #14 2024-10-22 19:46:04 ~3 min ios :package:zip
:heavy_multiplication_x: 5153ffbd #14 2024-10-22 19:53:50 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: 5153ffbd #14 2024-10-22 20:13:50 ~32 min tests :page_facing_up:log
:x: ddfa5683 #15 2024-10-22 20:30:22 ~49 sec ios :page_facing_up:log
:x: ddfa5683 #15 2024-10-22 20:30:26 ~55 sec android :page_facing_up:log
:x: ddfa5683 #15 2024-10-22 20:30:33 ~1 min linux :page_facing_up:log
:heavy_multiplication_x: ddfa5683 #15 2024-10-22 20:31:49 ~2 min tests :page_facing_up:log
:heavy_multiplication_x: ddfa5683 #15 2024-10-22 20:31:52 ~2 min tests-rpc :page_facing_up:log
:heavy_multiplication_x: fc11bbdb #16 2024-10-22 20:46:12 ~2 min tests :page_facing_up:log
:heavy_check_mark: fc11bbdb #16 2024-10-22 20:46:47 ~2 min android :package:aar
:heavy_check_mark: fc11bbdb #16 2024-10-22 20:46:55 ~3 min linux :package:zip
:heavy_check_mark: fc11bbdb #16 2024-10-22 20:46:58 ~3 min ios :package:zip
:heavy_multiplication_x: fc11bbdb #16 2024-10-22 20:49:58 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: 1afd0d58 #17 2024-10-22 21:03:17 ~3 min android :package:aar
:heavy_check_mark: 1afd0d58 #17 2024-10-22 21:03:22 ~3 min linux :package:zip
:heavy_check_mark: 1afd0d58 #17 2024-10-22 21:03:27 ~3 min ios :package:zip
:heavy_multiplication_x: 1afd0d58 #17 2024-10-22 21:06:21 ~5 min tests-rpc :page_facing_up:log
:heavy_check_mark: 1afd0d58 #17 2024-10-22 21:33:45 ~33 min tests :page_facing_up:log
:heavy_check_mark: 3781385e #18 2024-10-23 13:19:06 ~2 min android :package:aar
:heavy_check_mark: 3781385e #18 2024-10-23 13:19:44 ~2 min linux :package:zip
:heavy_check_mark: 3781385e #18 2024-10-23 13:19:59 ~2 min ios :package:zip
:heavy_check_mark: 3781385e #18 2024-10-23 13:23:13 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: 3781385e #18 2024-10-23 13:49:38 ~32 min tests :page_facing_up:log
:heavy_multiplication_x: 6110f1eb #19 2024-10-24 10:48:16 ~2 min tests :page_facing_up:log
:heavy_check_mark: 6110f1eb #19 2024-10-24 10:48:36 ~3 min linux :package:zip
:heavy_check_mark: 6110f1eb #19 2024-10-24 10:48:42 ~3 min android :package:aar
:heavy_check_mark: 6110f1eb #19 2024-10-24 10:48:47 ~3 min ios :package:zip
:heavy_multiplication_x: 6110f1eb #19 2024-10-24 10:51:17 ~5 min tests-rpc :page_facing_up:log
:heavy_check_mark: d6cf6d4b #20 2024-10-24 11:07:23 ~5 min linux :package:zip
:heavy_multiplication_x: d6cf6d4b #20 2024-10-24 11:08:08 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: d6cf6d4b #20 2024-10-24 11:08:13 ~6 min ios :package:zip
:heavy_check_mark: d6cf6d4b #20 2024-10-24 11:08:23 ~6 min android :package:aar
:heavy_check_mark: d6cf6d4b #20 2024-10-24 11:35:30 ~33 min tests :page_facing_up:log
:heavy_check_mark: d6cf6d4b #21 2024-10-24 12:46:10 ~2 min tests-rpc :page_facing_up:log
:heavy_check_mark: c9d1f149 #1 2024-10-28 18:13:52 ~5 min macos :package:zip
:heavy_check_mark: c9d1f149 #21 2024-10-28 18:14:01 ~5 min linux :package:zip
:heavy_check_mark: c9d1f149 #1 2024-10-28 18:14:08 ~5 min macos :package:zip
:heavy_check_mark: c9d1f149 #21 2024-10-28 18:14:25 ~5 min ios :package:zip
:heavy_check_mark: c9d1f149 #22 2024-10-28 18:15:21 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: c9d1f149 #21 2024-10-28 18:15:31 ~6 min android :package:aar
:heavy_multiplication_x: c9d1f149 #1 2024-10-28 18:19:08 ~10 min windows :package:zip
:heavy_check_mark: c9d1f149 #21 2024-10-28 18:42:34 ~33 min tests :page_facing_up:log
:heavy_check_mark: 8c1de079 #2 2024-10-28 18:55:22 ~5 min macos :package:zip
:heavy_check_mark: 8c1de079 #2 2024-10-28 18:55:35 ~5 min macos :package:zip
:heavy_check_mark: 8c1de079 #22 2024-10-28 18:55:54 ~5 min linux :package:zip
:heavy_check_mark: 8c1de079 #23 2024-10-28 18:56:22 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: 8c1de079 #22 2024-10-28 18:56:23 ~6 min ios :package:zip
:heavy_check_mark: 8c1de079 #22 2024-10-28 18:56:30 ~6 min android :package:aar
:heavy_multiplication_x: 8c1de079 #2 2024-10-28 19:00:31 ~10 min windows :package:zip
:heavy_check_mark: 8c1de079 #22 2024-10-28 19:24:00 ~33 min tests :page_facing_up:log
:heavy_check_mark: da8aea66 #3 2024-10-28 19:06:46 ~5 min macos :package:zip
:heavy_check_mark: da8aea66 #3 2024-10-28 19:07:08 ~5 min macos :package:zip
:heavy_check_mark: da8aea66 #23 2024-10-28 19:07:18 ~5 min linux :package:zip
:heavy_check_mark: da8aea66 #23 2024-10-28 19:07:36 ~6 min ios :package:zip
:heavy_check_mark: da8aea66 #24 2024-10-28 19:07:46 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: da8aea66 #23 2024-10-28 19:08:01 ~6 min android :package:aar
:heavy_multiplication_x: da8aea66 #3 2024-10-28 19:12:03 ~10 min windows :package:zip
:grey_question: Commit :hash: Finished (UTC) Duration Platform Result
:heavy_check_mark: fdba6cb8 #25 2024-10-28 19:10:31 ~2 min tests-rpc :page_facing_up:log
:heavy_check_mark: fdba6cb8 #4 2024-10-28 19:13:31 ~5 min macos :package:zip
:heavy_check_mark: fdba6cb8 #24 2024-10-28 19:13:38 ~5 min linux :package:zip
:heavy_check_mark: fdba6cb8 #4 2024-10-28 19:13:44 ~5 min macos :package:zip
:heavy_check_mark: fdba6cb8 #24 2024-10-28 19:14:18 ~6 min ios :package:zip
:heavy_check_mark: fdba6cb8 #24 2024-10-28 19:14:31 ~6 min android :package:aar
:heavy_multiplication_x: fdba6cb8 #4 2024-10-28 19:22:30 ~10 min windows :package:zip
:heavy_multiplication_x: fdba6cb8 #23 2024-10-28 19:28:14 ~4 min tests :page_facing_up:log
:heavy_check_mark: df082f6a #5 2024-10-28 20:23:20 ~5 min macos :package:zip
:heavy_check_mark: df082f6a #5 2024-10-28 20:23:25 ~5 min macos :package:zip
:heavy_check_mark: df082f6a #25 2024-10-28 20:23:45 ~5 min linux :package:zip
:heavy_check_mark: df082f6a #25 2024-10-28 20:24:06 ~6 min ios :package:zip
:heavy_check_mark: df082f6a #26 2024-10-28 20:24:10 ~6 min tests-rpc :page_facing_up:log
:heavy_check_mark: df082f6a #25 2024-10-28 20:24:28 ~6 min android :package:aar
:heavy_multiplication_x: df082f6a #5 2024-10-28 20:28:44 ~10 min windows :package:zip
:heavy_check_mark: df082f6a #24 2024-10-28 20:51:01 ~32 min tests :page_facing_up:log

status-im-auto avatar Oct 17 '24 13:10 status-im-auto

Codecov Report

Attention: Patch coverage is 42.46430% with 1088 lines in your changes missing coverage. Please review.

Project coverage is 47.51%. Comparing base (d77d243) to head (df082f6). Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
services/wallet/api.go 5.48% 155 Missing :warning:
services/wallet/history/service.go 6.77% 110 Missing :warning:
services/wallet/transfer/commands_sequential.go 70.05% 100 Missing :warning:
services/wallet/collectibles/manager.go 10.20% 88 Missing :warning:
mailserver/mailserver.go 19.51% 66 Missing :warning:
services/wallet/transfer/downloader.go 34.34% 65 Missing :warning:
services/wallet/transfer/commands.go 55.20% 43 Missing :warning:
mobile/status.go 3.03% 32 Missing :warning:
services/wallet/common/log_parser.go 18.51% 22 Missing :warning:
api/geth_backend.go 54.34% 21 Missing :warning:
... and 97 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5962      +/-   ##
===========================================
+ Coverage    47.48%   47.51%   +0.02%     
===========================================
  Files          850      850              
  Lines       138619   139515     +896     
===========================================
+ Hits         65828    66295     +467     
- Misses       65004    65442     +438     
+ Partials      7787     7778       -9     
Flag Coverage Δ
functional 10.17% <10.41%> (-0.05%) :arrow_down:
unit 47.00% <41.67%> (+0.02%) :arrow_up:

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

Files with missing lines Coverage Δ
account/accounts_geth.go 91.30% <100.00%> (+0.82%) :arrow_up:
api/test_helpers.go 87.50% <100.00%> (ø)
circuitbreaker/circuit_breaker.go 97.84% <100.00%> (ø)
cmd/statusd/main.go 39.15% <100.00%> (ø)
common/dbsetup/db_setup.go 61.11% <100.00%> (-2.05%) :arrow_down:
discovery/discv5.go 80.00% <100.00%> (ø)
mobile/status_request_log.go 90.47% <100.00%> (ø)
params/config.go 70.62% <100.00%> (+0.83%) :arrow_up:
protocol/requests/create_community_request.go 68.42% <100.00%> (ø)
protocol/v1/status_message.go 76.00% <100.00%> (+1.00%) :arrow_up:
... and 126 more

... and 28 files with indirect coverage changes

codecov[bot] avatar Oct 17 '24 13:10 codecov[bot]

image

image

igor-sirotin avatar Oct 23 '24 09:10 igor-sirotin

@igor-sirotin @richard-ramos, re-requesting review. Many other areas have also been updated. I’ve essentially removed the use of the geth logger across the codebase, though there's still some work left to eliminate it completely.

osmaczko avatar Oct 23 '24 14:10 osmaczko

Desktop PR created: https://github.com/status-im/status-desktop/pull/16589, will run full regression tests.

osmaczko avatar Oct 23 '24 18:10 osmaczko

Mobile PR created: https://github.com/status-im/status-mobile/pull/21492

osmaczko avatar Oct 23 '24 18:10 osmaczko

I'm a bit worried of massive usage of zap.Error, because it automatically adds errorVerbose with the whole call stack, and it's usually 10x longer than the log line itself.

It is like that at least for Development logger, maybe it's different for the Production. But if I get it right, we use Development logger in prod now 🙂

Anyways, it's just a heads up to think about later. There're some hacks to remove it.

Thanks for heads up. That's not the case now. Errors in geth.log do not contain the whole call stack. The adapter that transforms zap logs to geth logs is using production configuration: https://github.com/status-im/status-go/blob/54fdf50577cccccdccef67a19abf674c5ee9f271/logutils/zap_adapter.go#L136

With these changes, the output of logs should be almost the same as it was before.

osmaczko avatar Oct 28 '24 15:10 osmaczko