Skip to content
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

sipgo.Client should inherit logger from Diago in Diago{}.InviteBridge #30

Open
matthew-nichols opened this issue Dec 4, 2024 · 2 comments

Comments

@matthew-nichols
Copy link

matthew-nichols commented Dec 4, 2024

I assume the call to sipgo.NewClient in diago.getClient needs to be updated to pass the logger from Diago{} to it.

Also, there are a couple places where the logger doesn't inherit properly or is difficult to set (sipgo.NewUA doesn't inherit the logger in the TransportLayer or the TransactionLayer)

@emiago
Copy link
Owner

emiago commented Dec 4, 2024

Hi @matthew-nichols

There is not yet really locality of logger everywhere. I agree. Lot of is just using global zerolog logger.
I think I just do not give this too much attention, as normally I keep same logger everywhere.

Client, last time I checked had no logging (maybe something slipped), so I guess this is probably more on transport/transaction layer.
Anyway thanks for bringing this up. Lets maybe start with sipgo.
Also if you explain your use case (although I may guess) just to have here as reference.

@matthew-nichols
Copy link
Author

Automated test calls for our customers' phone numbers on our platform, and yeah, it looks like transport stuff ("Resolving DNS" and the like). It would be good to have the logs match with our existing trace IDs.

I was able to hack it by only allowing one call per process at a time and replacing the global logger each time, but I'm not the biggest fan of that solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants