open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
384 stars 180 forks source link

logging: use static stream in LogToFileRotate #718

Closed dvrogozh closed 1 year ago

dvrogozh commented 1 year ago

We initialized the stream to write to in LogToFileRotate() but it got deinitialized on the exit from the scope while its reference remained in the logging which causes a crash on the first write. That's a quick fix. More appropriately would be to change webrtc function prototype for it to accept stream for the ref count increment.