Page MenuHomePhabricator

[Backup] Initialize logger with tokio runtime
ClosedPublic

Authored by jon on Sep 12 2022, 3:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 6:36 PM
Unknown Object (File)
Sun, Oct 27, 6:36 PM
Unknown Object (File)
Sun, Oct 27, 6:36 PM
Unknown Object (File)
Sun, Oct 27, 6:36 PM
Unknown Object (File)
Sun, Oct 27, 6:36 PM
Unknown Object (File)
Sun, Oct 27, 6:35 PM
Unknown Object (File)
Oct 9 2024, 8:40 PM
Unknown Object (File)
Oct 9 2024, 8:39 PM
Subscribers

Details

Summary

Loggers in rust need to be initialized once. Since we don't really
have a main, I instead snuck it in with initializing the tokio runtime.

Part of https://linear.app/comm/issue/ENG-1717

Test Plan
  • Run backup server
  • View logs

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested changes to this revision.Sep 13 2022, 9:48 AM

(Unfortunately don't have enough Rust background to give this a proper review.)

This revision now requires changes to proceed.Sep 13 2022, 9:48 AM
atul removed a reviewer: atul.

Crap, sorry meant to resign.

This revision now requires review to proceed.Sep 13 2022, 9:49 AM

I cannot patch this diff locally. I fetched tags and pulled changes from the remote. Please, fix this (or maybe I missed something?).

This doesn't work when I try to patch on the top of D5123, otherwise, it looks alright.

This revision is now accepted and ready to land.Sep 14 2022, 3:57 AM

Target new runtime location

This revision is now accepted and ready to land.Sep 16 2022, 2:31 PM

Add info log to demonstrate usage