How to enable trace/log

2,533 views
Skip to first unread message

XING WEN

unread,
Apr 19, 2013, 2:49:11 AM4/19/13
to discuss...@googlegroups.com
Hi:

I was trying to trace some package timing issue in RTP session. Is there a way to turn on the log or WEBRTC_TRACE? I am working on peerconnection_client project.
I searched in our old posters and none of their answers could work...

Many thanks.
Xing

XING WEN

unread,
Apr 19, 2013, 4:27:04 AM4/19/13
to discuss...@googlegroups.com
I have traced to a file called trace_impl_no_op.cc.cc and all functions are returned and doing nothing.

WebRtc_Word32 Trace::SetTraceFile(const char/*fileName*/,
                                  const bool /*addFileCounter*/)
{
    return -1;
}


There is another one named trace_impl.cc is excluded from the build. Should I manually put it back?

Thanks.
Xing



在 2013年4月18日星期四UTC-7下午11时49分11秒,XING WEN写道:

Henrik Andreasson

unread,
Apr 19, 2013, 4:39:49 AM4/19/13
to discuss...@googlegroups.com
You can generate WebRTC logs in Chrome by running chrome with --enable-logging --v=1 --
vmodule=*libjingle/source/talk/*=3.


--
 
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

XING WEN

unread,
Apr 19, 2013, 1:09:00 PM4/19/13
to discuss...@googlegroups.com
Hi Henrik:

Thanks for your quick response. 
Is there a possible way to generate the log or trace to txt file? Or I have to use it with Chrome? 

Thanks.
Xing


2013/4/19 Henrik Andreasson <hen...@webrtc.org>

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/2LeAGGx71YA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.

Vikas

unread,
Apr 19, 2013, 2:51:05 PM4/19/13
to discuss-webrtc

Hi,

Yes by running with above arguments a log file should be created in
your chrome's user data directory. You can refer here to find the
location of chrome log file :- http://www.chromium.org/for-testers/enable-logging

/Vikas
On Apr 19, 10:09 am, XING WEN <td.wenx...@gmail.com> wrote:
> Hi Henrik:
>
> Thanks for your quick response.
> Is there a possible way to generate the log or trace to txt file? Or I have
> to use it with Chrome?
>
> Thanks.
> Xing
>
> 2013/4/19 Henrik Andreasson <henr...@webrtc.org>
>
>
>
>
>
>
>
> > You can generate WebRTC logs in Chrome by running chrome with
> > --enable-logging --v=1 --
> > vmodule=*libjingle/source/talk/*=3.
>
> > On Fri, Apr 19, 2013 at 10:27 AM, XING WEN <td.wenx...@gmail.com> wrote:
>
> >> I have traced to a file called trace_impl_no_op.cc.cc and all functions
> >> are returned and doing nothing.
>
> >> WebRtc_Word32 Trace::SetTraceFile(const char* /*fileName*/,
> >>                                   const bool /*addFileCounter*/)
> >> {
> >>     return -1;
> >> }
>
> >> There is another one named trace_impl.cc is excluded from the build.
> >> Should I manually put it back?
>
> >> Thanks.
> >> Xing
>
> >> 在 2013年4月18日星期四UTC-7下午11时49分11秒,XING WEN写道:
>
> >>> Hi:
>
> >>> I was trying to trace some package timing issue in RTP session. Is there
> >>> a way to turn on the log or WEBRTC_TRACE? I am working
> >>> on peerconnection_client project.
> >>> I searched in our old posters and none of their answers could work...
>
> >>> Many thanks.
> >>> Xing
>
> >>  --
>
> >> ---
> >> You received this message because you are subscribed to the Google Groups
> >> "discuss-webrtc" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to discuss-webrt...@googlegroups.com.
>
> >> For more options, visithttps://groups.google.com/groups/opt_out.
>
> >  --
>
> > ---
> > You received this message because you are subscribed to a topic in the
> > Google Groups "discuss-webrtc" group.
> > To unsubscribe from this topic, visit
> >https://groups.google.com/d/topic/discuss-webrtc/2LeAGGx71YA/unsubscr...
> > .

Siping Tao

unread,
May 8, 2013, 11:46:38 PM5/8/13
to discuss...@googlegroups.com
I noticed that there are two implementations in webrtc trace/log, trace_impl.cc/logging.cc and trace_impl_no_op.cc/logging_no_op.cc. I guess you can only do some modification to the project file to switch which implementation you want, then can use the trace/log code as you needed. Please remember that you also need to let trace_win.cc/.h be complied if for windows build.

Does anyone know how to modify gyp file to do this (i.e. enable log and trace)? Instinctively I think it should be easier by gyp.

Thanks,
Siping

在 2013年4月19日星期五UTC+8下午2时49分11秒,XING WEN写道:

XING WEN

unread,
May 9, 2013, 1:42:19 PM5/9/13
to discuss...@googlegroups.com
Hi Siping:

Yes, I already figure it out :-) Just didn't find a time to update.

1.     1.  Include following files to “system_wrappers” project

  "trace_impl.cc"

  "trace_impl_h""

  "trace_win.cc"

  "trace_win.h"

2.     2.  Remove “trace_impl_no_op.cc”


3.    3.   Change in “trace_impl.h” and “trace_win.h”

from

#include "webrtc/system_wrappers/interface/trace.h"

                to

#include "webrtc/system_wrappers/source/trace_impl.h"

 

4.      4. Add log file name and trace filter criteria

webrtc\trunk\third_party\webrtc\video_engine\vie_impl.cc

VideoEngine* VideoEngine::Create() {

#if (defined(WIN32_) || defined(WIN64_))

  // Load a debug dll, if there is one.

  HMODULE hmod_ = LoadLibrary(TEXT("VideoEngineTestingDLL.dll"));

  if (hmod_) {

    typedef VideoEngine* (*PFNGetVideoEngineLib)(void);

    PFNGetVideoEngineLib pfn =

      (PFNGetVideoEngineLib)GetProcAddress(hmod_, "GetVideoEngine");

    if (pfn) {

      VideoEngine* self = pfn();

      return self;

    } else {

      assert(false && "Failed to open test dll VideoEngineTestingDLL.dll");

      return NULL;

    }

  }

#endif

  //log

  //VideoEngine::SetTraceFile("VideoEngine_Create.txt");

  //VideoEngine::SetTraceFilter(kTraceDefault);

   return GetVideoEngine();

}


Thanks.
Xing

2013/5/8 Siping Tao <sipin...@gmail.com>

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
Reply all
Reply to author
Forward
0 new messages