summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorthaloun@google.com <thaloun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 17:08:13 +0000
committerthaloun@google.com <thaloun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-03 17:08:13 +0000
commit56b8c4c2cc54757b5e5103552fe6b98f633e4a81 (patch)
tree3c19d3b05a45fee6f033bea45c3079eef3aca241 /o3d
parent12854b52fe1255752ea939da97d869ce62be231a (diff)
downloadchromium_src-56b8c4c2cc54757b5e5103552fe6b98f633e4a81.zip
chromium_src-56b8c4c2cc54757b5e5103552fe6b98f633e4a81.tar.gz
chromium_src-56b8c4c2cc54757b5e5103552fe6b98f633e4a81.tar.bz2
Don't use the process' default directory for the logfile. Use the temp directory instead.
Sending now, while I set up my windows build to test across a couple platforms. Review URL: http://codereview.chromium.org/3303006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58501 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/plugin/linux/main_linux.cc8
-rw-r--r--o3d/plugin/mac/main_mac.mm8
-rw-r--r--o3d/plugin/win/main_win.cc8
3 files changed, 21 insertions, 3 deletions
diff --git a/o3d/plugin/linux/main_linux.cc b/o3d/plugin/linux/main_linux.cc
index c462fac..a61f6f8 100644
--- a/o3d/plugin/linux/main_linux.cc
+++ b/o3d/plugin/linux/main_linux.cc
@@ -38,6 +38,7 @@
#include <gdk/gdkkeysyms.h>
#include "base/at_exit.h"
#include "base/command_line.h"
+#include "base/file_util.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "o3d/breakpad/linux/breakpad.h"
@@ -632,7 +633,12 @@ NPError InitializePlugin() {
g_breakpad.set_version(O3D_PLUGIN_VERSION);
CommandLine::Init(0, NULL);
- InitLogging("debug.log",
+
+ FilePath log;
+ file_util::GetTempDir(&log);
+ log = log.Append("debug.log");
+
+ InitLogging(log.value().c_str(),
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
logging::DONT_LOCK_LOG_FILE,
logging::APPEND_TO_OLD_LOG_FILE);
diff --git a/o3d/plugin/mac/main_mac.mm b/o3d/plugin/mac/main_mac.mm
index 2daefe5..f3ed8c7 100644
--- a/o3d/plugin/mac/main_mac.mm
+++ b/o3d/plugin/mac/main_mac.mm
@@ -37,6 +37,7 @@
#include "base/at_exit.h"
#include "base/command_line.h"
+#include "base/file_util.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
@@ -489,7 +490,12 @@ NPError InitializePlugin() {
// Turn on the logging.
CommandLine::Init(0, NULL);
- InitLogging("debug.log",
+
+ FilePath log;
+ file_util::GetTempDir(&log);
+ log = log.Append("debug.log");
+
+ InitLogging(log.value().c_str(),
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
logging::DONT_LOCK_LOG_FILE,
logging::APPEND_TO_OLD_LOG_FILE);
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index 3042306..225125b 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -41,6 +41,7 @@
#include "base/at_exit.h"
#include "base/command_line.h"
+#include "base/file_util.h"
#include "base/logging.h"
#include "base/ref_counted.h"
#include "core/cross/display_mode.h"
@@ -665,7 +666,12 @@ NPError InitializePlugin() {
// Turn on the logging.
CommandLine::Init(0, NULL);
- InitLogging(L"debug.log",
+
+ FilePath log;
+ file_util::GetTempDir(&log);
+ log.Append(L"debug.log");
+
+ InitLogging(log.value().c_str(),
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG,
logging::DONT_LOCK_LOG_FILE,
logging::APPEND_TO_OLD_LOG_FILE);