Page MenuHomePhabricator

[services] Tunnelbroker - Distinguish logging levels in dev-mode
ClosedPublic

Authored by max on May 26 2022, 1:30 AM.
Tags
None
Referenced Files
F2193684: D4132.diff
Thu, Jul 4, 10:51 PM
F2190265: D4132.id.diff
Thu, Jul 4, 11:37 AM
F2189030: D4132.id13206.diff
Thu, Jul 4, 10:00 AM
F2188737: D4132.id13137.diff
Thu, Jul 4, 9:31 AM
F2186929: D4132.id13144.diff
Thu, Jul 4, 5:03 AM
F2185717: D4132.id13144.diff
Thu, Jul 4, 12:46 AM
F2185279: D4132.diff
Wed, Jul 3, 11:35 PM
Unknown Object (File)
Mon, Jul 1, 6:31 AM

Details

Summary

Distinguish glog logging levels in production (default) and dev-mode.
For the production-mode we are using the minimal logging level 2 which corresponds to ERROR and FATAL messages.
For the dev-mode we're using the minimal logging level 0 which corresponds to showing all messages including INFO and WARNING.

Linear task: ENG-1102

Test Plan

Running yarn run-tunnelbroker-service prints only LOG(ERROR) and LOG(FATAL) messages.
Running yarn run-tunnelbroker-service-dev-mode prints LOG(INFO), LOG(WARNING), LOG(ERROR) and LOG(FATAL) messages.

Diff Detail

Repository
rCOMM Comm
Branch
set-logging-level-on-start
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max held this revision as a draft.
max published this revision for review.May 26 2022, 1:37 AM

Fixed typo in function paramater.

tomek requested changes to this revision.May 26 2022, 4:06 AM
tomek added 1 blocking reviewer(s): karol.
tomek added inline comments.
services/tunnelbroker/src/server.cpp
45 ↗(On Diff #13139)

I think it is better to have warnings in production logs - they might be really useful when investigating bugs.

This revision now requires changes to proceed.May 26 2022, 4:06 AM

Change the production logging level to 1 (Warnings, Errors, Fatals).

max added inline comments.
services/tunnelbroker/src/server.cpp
45 ↗(On Diff #13139)

I think it is better to have warnings in production logs - they might be really useful when investigating bugs.

I've made this change.

This revision is now accepted and ready to land.May 27 2022, 2:24 AM
max marked an inline comment as done.

Rebase on master.