Index: headless/app/headless_shell_main.cc |
diff --git a/headless/app/headless_shell_main.cc b/headless/app/headless_shell_main.cc |
index 3ae4553b06854f9745690e4cc992267a7e4862ad..96a419180c658588597687517879505c48294ea5 100644 |
--- a/headless/app/headless_shell_main.cc |
+++ b/headless/app/headless_shell_main.cc |
@@ -2,8 +2,26 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/command_line.h" |
+#include "base/files/file_path.h" |
+#include "base/path_service.h" |
#include "headless/public/headless_shell.h" |
+void InitLogging() { |
+ base::FilePath log_filename; |
Sami
2017/02/09 17:51:40
I've recently added support for logging (https://c
dvallet
2017/02/10 05:29:49
Done. I think it should be working.
dvallet
2017/02/13 00:50:34
I've cheked is working in Windows. Though I had to
|
+ PathService::Get(base::DIR_EXE, &log_filename); |
+ log_filename = log_filename.AppendASCII("headless_shell.log"); |
+ logging::LoggingSettings settings; |
+ 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, true, true, true); |
+} |
+ |
int main(int argc, const char** argv) { |
+ base::CommandLine::Init(argc, argv); |
+ InitLogging(); |
+ |
return headless::HeadlessShellMain(argc, argv); |
} |