Avoid creation of debug.log file

4,564 views
Skip to first unread message

Matthias Haeusser

unread,
Feb 28, 2014, 8:16:51 AM2/28/14
to cefs...@googlegroups.com
When I run CefSharp, an empty file called debug.log is immediately created in the start directory. Is there a way to avoid this?
The only place where I found "debug.log" in the code is in cef_types.h, in the comments above cef_string_t log_file;

Jørn Hansen

unread,
Feb 28, 2014, 10:32:06 AM2/28/14
to cefs...@googlegroups.com


On Friday, February 28, 2014 2:16:51 PM UTC+1, Matthias Haeusser wrote:
When I run CefSharp, an empty file called debug.log is immediately created in the start directory. Is there a way to avoid this?
The only place where I found "debug.log" in the code is in cef_types.h, in the comments above cef_string_t log_file;

settings.LogSeverity = LogSeverity.Disable; is your friend!

Best regards,
JornH 

Matthias Haeusser

unread,
Feb 28, 2014, 11:08:24 AM2/28/14
to cefs...@googlegroups.com

Thanks, but where is the serverity actually set, and where is the log file name defined?

Best regards,
Matthias
 

Jørn Hansen

unread,
Feb 28, 2014, 11:58:58 AM2/28/14
to cefs...@googlegroups.com
On Friday, February 28, 2014 5:08:24 PM UTC+1, Matthias Haeusser wrote:
>
> Thanks, but where is the serverity actually set, and where is the log file name defined?
>
>
>  
See for example https://github.com/cefsharp/CefSharp.MinimalExample/blob/master/CefSharp.MinimalExample.Wpf/App.xaml.cs

You pass in an instance of the CefSettings class with your settings to your Cef.Initialize() call

CefSettings also has a way to set the file name. If you don't give one the underlying native CEF project defaults to "debug.log" as you saw in the .h file which is actually supplied from CEF.

The examples above is with CefSharp3 which I tested with. In CefSharp version 1 you call CEF.Initialize() uppercase but it should have the same settings regarding debugging.

Matthias Haeusser

unread,
Mar 3, 2014, 5:02:39 AM3/3/14
to cefs...@googlegroups.com
That worked, thanks a lot!
Reply all
Reply to author
Forward
0 new messages