logging from render thread

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

logging from render thread

Postby gigi777 » Mon Aug 21, 2017 7:08 pm

Hi, I am new to CEF. My app is based on the cefsimple app. I can successfully add logging to the browser thread and see the output in std out. However, adding logging or just printf statements in the render thread do not get directed to std out. How does one enable logging from the render thread? Thanks.
gigi777
Techie
 
Posts: 13
Joined: Fri Aug 11, 2017 5:35 pm

Re: logging from render thread

Postby magreenblatt » Mon Aug 21, 2017 10:51 pm

If you use the macros from cef_logging.h the messages will be written to the debug log file. If you want to use printf you can disable the sandbox by passing the --no-sandbox command-line flag.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: logging from render thread

Postby gigi777 » Tue Aug 29, 2017 12:55 pm

Thanks for reply. I would like to add logging from the third_party/skia modules. I didn't see macros from cef_logging.h being used in skia package. Do you see any issues with using cef_logging.h macros in skia modules? Will the messages also be written to the debug log file?
gigi777
Techie
 
Posts: 13
Joined: Fri Aug 11, 2017 5:35 pm

Re: logging from render thread

Postby magreenblatt » Tue Aug 29, 2017 1:13 pm

Skia has its own logging functions, see src/third_party/skia/include/core/SkTypes.h. I'm not whether they're routed to the Chromium logs.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm

Re: logging from render thread

Postby gigi777 » Tue Aug 29, 2017 2:39 pm

I used the logging macros from SkTypes.h and they are indeed routed to chromium debug log file. Thanks!
gigi777
Techie
 
Posts: 13
Joined: Fri Aug 11, 2017 5:35 pm

Re: logging from render thread

Postby gigi777 » Thu Sep 07, 2017 2:20 pm

Is it possible to change the name and location of the debug.log file using command line arguments?
gigi777
Techie
 
Posts: 13
Joined: Fri Aug 11, 2017 5:35 pm

Re: logging from render thread

Postby magreenblatt » Thu Sep 07, 2017 2:39 pm

Yes, there's a --log-file=xxx command-line flag.
magreenblatt
Site Admin
 
Posts: 12383
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 57 guests