by alice0 » Wed Dec 11, 2024 10:11 pm
I try to use cef-project and add LOG command on main_win.cc
```
#if !defined(CEF_USE_SANDBOX)
settings.no_sandbox = true;
#endif
// Initialize the CEF browser process. The first browser instance will be
// created in CefBrowserProcessHandler::OnContextInitialized() after CEF has
// been initialized. May return false if initialization fails or if early exit
// is desired (for example, due to process singleton relaunch behavior).
if (!CefInitialize(main_args, settings, app, sandbox_info)) {
return 1;
}
DLOG(WARNING) << "PROCESS_TYPE_BROWSER debug";
LOG(WARNING) << "PROCESS_TYPE_BROWSER";
DLOG(INFO) << "PROCESS_TYPE_BROWSER debug";
LOG(INFO) << "PROCESS_TYPE_BROWSER";
DLOG(WARNING) << "PROCESS_TYPE_BROWSER debug";
LOG(WARNING) << "PROCESS_TYPE_BROWSER";
PLOG(ERROR) << "Couldn't do foo";
// Run the CEF message loop. This will block until CefQuitMessageLoop() is
// called.
CefRunMessageLoop();
DLOG(WARNING) << "PROCESS_TYPE_BROWSER debug";
LOG(WARNING) << "PROCESS_TYPE_BROWSER";
// Shut down CEF.
CefShutdown();
return 0;
}
```
And then go to build folder and open command prompt
```
.\resource_manager.exe --enable-logging
```
No log on command prompt for resource_manager project
I use error warning info and all is not work.
What happen?
I use windows 11 and visual studio to build.
I found the problem that LOG(WARNING) is not work.
Only LOG(ERROR) and DLOG(ERROR) can work when .\resource_manager.exe --enable-logging
What should I control it to show warning and info
Last edited by
alice0 on Wed Dec 11, 2024 10:24 pm, edited 2 times in total.