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
Unknown Object (File)
Mon, Jul 1, 6:31 AM
Unknown Object (File)
Wed, Jun 26, 11:31 AM
Unknown Object (File)
Wed, Jun 26, 11:31 AM
Unknown Object (File)
Wed, Jun 26, 11:31 AM
Unknown Object (File)
Wed, Jun 26, 11:31 AM
Unknown Object (File)
Wed, Jun 26, 11:31 AM
Unknown Object (File)
Wed, Jun 26, 11:31 AM
Unknown Object (File)
Wed, Jun 26, 11:28 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.