In WebRTC codes there is a macro TRACE_EVENT1(). Probably this suppose to print somewhere info traces for events. How to enable TRACE_EVENT1() and make it work? Is it possible to print the event tracing in a file?
You need to setup an event tracer function. Whenever those macros are encountered, WebRTC would invoke your tracer function (that you have setup at the beginning). When inside your tracer function, you can print them in any convenient file.
webrtc::SetupEventTracer(getCategoryEnabledFunc, AddTraceFunction);
Now you should have AddTraceEventFunction defined as a function pointer somewhere and it should point to your logging function.
Event Tracer & Tracer Callbacks are different
Please note that the Event tracer setup like above takes care of the TRACE_EVENT macros. There's a separate notion of a Tracer callback (which is setup using the VoiceEngine::SetTraceCallback method). This is different and takes care of WEBRTC_TRACE macros.
Hope it helps