本文整理汇总了C++中Log::GetLogFile方法的典型用法代码示例。如果您正苦于以下问题:C++ Log::GetLogFile方法的具体用法?C++ Log::GetLogFile怎么用?C++ Log::GetLogFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Log
的用法示例。
在下文中一共展示了Log::GetLogFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: args
WebBrowserHost::WebBrowserHost(Context* context) : Object (context)
{
const Vector<String>& arguments = GetArguments();
#ifdef ATOMIC_PLATFORM_LINUX
XSetErrorHandler(XErrorHandlerImpl);
XSetIOErrorHandler(XIOErrorHandlerImpl);
// Install a signal handler so we clean up after ourselves.
signal(SIGINT, TerminationSignalHandler);
signal(SIGTERM, TerminationSignalHandler);
#endif
// IMPORTANT: See flags being set in implementation of void WebAppBrowser::OnBeforeCommandLineProcessing
// these include "--enable-media-stream", "--enable-usermedia-screen-capturing", "--off-screen-rendering-enabled", "--transparent-painting-enabled"
#ifdef ATOMIC_PLATFORM_LINUX
static const char* _argv[2] = { "AtomicWebView", "--disable-setuid-sandbox" };
CefMainArgs args(2, (char**) &_argv);
#else
CefMainArgs args;
#endif
CefSettings settings;
settings.windowless_rendering_enabled = 1;
FileSystem* fs = GetSubsystem<FileSystem>();
// Set CEF log file to existing log folder if any avoid attempting to write
// to executable folder, which is likely not writeable
Log* log = GetSubsystem<Log>();
if (log && log->GetLogFile())
{
const File* logFile = log->GetLogFile();
String logPath = logFile->GetName ();
if (logPath.Length())
{
String pathName, fileName, ext;
SplitPath(logPath, pathName, fileName, ext);
if (pathName.Length())
{
pathName = AddTrailingSlash(pathName) + "CEF.log";
CefString(&settings.log_file).FromASCII(GetNativePath(pathName).CString());
}
}
}
// default background is white, add a setting
// settings.background_color = 0;
if (productVersion_.Length())
{
CefString(&settings.product_version).FromASCII(productVersion_.CString());
}
if (userAgent_.Length())
{
CefString(&settings.user_agent).FromASCII(userAgent_.CString());
}
String fullPath;
// If we've specified the absolute path to a root cache folder, use it
if (rootCacheFolder_.Length() && cacheName_.Length())
{
fullPath = rootCacheFolder_ + "/" + cacheName_;
CefString(&settings.cache_path).FromASCII(fullPath.CString());
}
else
{
fullPath = fs->GetAppPreferencesDir(cacheName_.CString(), "WebCache");
}
CefString(&settings.cache_path).FromASCII(fullPath.CString());
settings.remote_debugging_port = debugPort_;
d_ = new WebBrowserHostPrivate(this);
// If losing OSX system menu, it means we're calling this
// before initializing graphics subsystem
if (!CefInitialize(args, settings, d_->app_, nullptr))
{
ATOMIC_LOGERROR("CefInitialize - Error");
}
RegisterWebSchemeHandlers(this);
// Ensure cookie manager is created
CefCookieManager::GetGlobalManager(nullptr);
SubscribeToEvent(E_UPDATE, ATOMIC_HANDLER(WebBrowserHost, HandleUpdate));
instance_ = this;
//.........这里部分代码省略.........