nrkno / sofie-core

Sofie Core: A Part of the Sofie TV Studio Automation System
https://github.com/nrkno/Sofie-TV-automation/
MIT License
124 stars 40 forks source link

fix: log connected client info, server side #1132

Closed nytamin closed 5 months ago

nytamin commented 5 months ago

About the Contributor

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix / Code improvement

Current Behavior

When a client connects or disconnects, the only logs we have are:

[debug] Connection count: 2

New Behavior

More detailed logs:

[debug] Client connected: "ZRAdErn2pzytAikzw", "127.0.0.1"
[info] Client info, 2024-01-26T12:38:41.723Z ClientLog "null"/"beZyPQ2J": Starting up
[info] Client info, 2024-01-26T12:38:41.736Z ClientLog "null"/"beZyPQ2J": Disconnected
[info] Client info, 2024-01-26T12:38:41.736Z ClientLog "null"/"beZyPQ2J": Status "connecting"
[info] Client info, 2024-01-26T12:38:42.037Z ClientLog "2kYDpJJN3dDH36Jii"/"beZyPQ2J": Connected
[info] Client info, 2024-01-26T12:38:42.037Z ClientLog "2kYDpJJN3dDH36Jii"/"beZyPQ2J": Status "connected"
[debug] Connection count: 2

// When disconnected:
[debug] Client disconnected: "2kYDpJJN3dDH36Jii", "127.0.0.1"
[debug] Connection count: 1

Testing Instructions

Other Information

Status

codecov[bot] commented 5 months ago

Codecov Report

Attention: 62 lines in your changes are missing coverage. Please review.

Comparison is base (a712912) 58.17% compared to head (1d25a31) 58.12%. Report is 20 commits behind head on release50.

Files Patch % Lines
meteor/client/lib/logStatus.ts 0.00% 53 Missing :warning:
.../server-core-integration/src/lib/coreConnection.ts 53.84% 6 Missing :warning:
meteor/server/Connections.ts 0.00% 2 Missing :warning:
meteor/lib/logging.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release50 #1132 +/- ## ============================================= - Coverage 58.17% 58.12% -0.05% ============================================= Files 479 480 +1 Lines 78758 78829 +71 Branches 4143 4149 +6 ============================================= + Hits 45815 45822 +7 - Misses 32885 32953 +68 + Partials 58 54 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.