Index: blimp/engine/app/blimp_main.cc |
diff --git a/blimp/engine/app/blimp_main.cc b/blimp/engine/app/blimp_main.cc |
index 64e3e5343802704fd9998442b485145ec2b708b2..5e23c2dc5b0ea0a87784cc660f97e6252df892d7 100644 |
--- a/blimp/engine/app/blimp_main.cc |
+++ b/blimp/engine/app/blimp_main.cc |
@@ -2,10 +2,37 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/at_exit.h" |
+#include "base/command_line.h" |
+#include "base/files/file_path.h" |
+#include "base/logging.h" |
+#include "base/path_service.h" |
#include "blimp/engine/app/blimp_content_main_delegate.h" |
#include "content/public/app/content_main.h" |
+namespace { |
+void InitLogging() { |
+ logging::LoggingSettings settings; |
+ base::FilePath log_filename; |
+ PathService::Get(base::DIR_EXE, &log_filename); |
+ log_filename = log_filename.AppendASCII("blimp_engine.log"); |
+ settings.logging_dest = logging::LOG_TO_ALL; |
+ settings.log_file = log_filename.value().c_str(); |
+ settings.delete_old = logging::DELETE_OLD_LOG_FILE; |
+ logging::InitLogging(settings); |
+ logging::SetLogItems(true, // Process ID |
+ true, // Thread ID |
+ true, // Timestamp |
+ false); // Tick count |
+} |
+} // namespace |
+ |
int main(int argc, const char** argv) { |
+ base::AtExitManager at_exit; |
haibinlu
2015/12/29 00:51:45
do we need at_exit?
Kevin M
2015/12/30 23:08:48
Done.
|
+ |
+ base::CommandLine::Init(argc, argv); |
haibinlu
2015/12/29 00:51:45
initlogging in bool BlimpContentMainDelegate::Basi
Kevin M
2015/12/30 23:08:49
Done.
|
+ InitLogging(); |
+ |
blimp::engine::BlimpContentMainDelegate delegate; |
content::ContentMainParams params(&delegate); |
params.argc = argc; |