-
-
Notifications
You must be signed in to change notification settings - Fork 617
Change child loggers (getChild
) to LogSpans
#4807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/matrixrtc/types.ts
Outdated
sent_ts?: number; | ||
// Why is this needed? | ||
f32d0099fcda8e995a0775f2f014cff583f000f3sent_ts?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
This doesn't sound like the right solution to this problem. If (Aside: https://github.com/element-hq/element-call/blob/livekit/src/settings/rageshake.ts#L9-L13 claims that element-call patches |
(The problem seems to be that we don't set the |
reading this: Lines 152 to 160 in a52c64b
It sounded to me like it fits our usecase fairly well where all the logs are related to the matrix RTCsessions and we just want to prefix, if its from: "EncryptionManager", |
Not quite understanding this. Do you mean "if it's from"? "LogSpan" is intended for when you might create thousands of the things, and it makes no sense to filter on them -- for example, you might create one per event ID. Doesn't it make sense that you might want to be able to change the log level for, say, Also: if you're basically saying that |
How would that look like? |
Have a look at |
With the child loggers, we ended up not seeing the logs in the rageshake because it requires a custom configuration in element call to write the child loggers (with getChild) into the rageshake log. LogSpans are a lightweight alternative that still use the same logger but only extend the prefix and hence end up in the rageshake without registering new loggers. It prohibits the footgun of not getting logs in the rageshake.
8129e00
to
44cf0aa
Compare
I tried very hard to get it to work with I tried with:
first. But this is not working. Then I tried all kinds of other more involved ways to get the correct (extended) method factory to the later initialized child loggers. I eventually got sth somewhat working: 4d7ab1c And then noticed that I never tried the initial approach with: @richvdh I think you like this other solution more? I still think the LogSpan is not compleatly off to what we are trying to achive. But in the end both work. |
Closed in favor of: #4809 |
With the child loggers, we ended up not seeing the logs in the rageshake because it requires a custom configuration in element call to write the child loggers (with getChild) into the rageshake log.
LogSpans are a lightweight alternative that still use the same logger but only extend the prefix and hence end up in the rageshake without registering new loggers.
It prohibits the footgun of not getting logs in the rageshake.
Checklist
public
/exported
symbols have accurate TSDoc documentation.