Commit dd0d2138 authored by alexeypa@chromium.org's avatar alexeypa@chromium.org

Stop writing logs to %ProgramData%\Chromoting\debug.log (Windows only).

%ProgramData% is read-only for processes running at low integrity level. since the host is now running at low integrity level and logs are written to ETW, this CL quits using debug.log altogether. See http://code.google.com/p/sawbuck/wiki/HowToCaptureLogsOffline for an example how logs can be collected via ETW infrastructure. The Chromoting provider's guid is "{2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}".

BUG=134694


Review URL: https://chromiumcodereview.appspot.com/11776029

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175433 0039d316-1c4b-4281-b951-d872f2087c98
parent 91af97b3
......@@ -6,10 +6,8 @@
#include <guiddef.h>
#include "base/file_path.h"
#include "base/logging.h"
#include "base/logging_win.h"
#include "remoting/host/branding.h"
// {2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}
const GUID kRemotingHostLogProvider =
......@@ -19,25 +17,13 @@ const GUID kRemotingHostLogProvider =
namespace remoting {
void InitHostLogging() {
#if defined(NDEBUG)
// Write logs to the system debug log in release build.
// Write logs to the system debug log.
logging::InitLogging(
NULL,
logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
logging::LOCK_LOG_FILE,
logging::DONT_LOCK_LOG_FILE,
logging::DELETE_OLD_LOG_FILE,
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
#else // !defined(NDEBUG)
// Write logs to a file in debug build.
FilePath debug_log = remoting::GetConfigDir().
Append(FILE_PATH_LITERAL("debug.log"));
logging::InitLogging(
debug_log.value().c_str(),
logging::LOG_ONLY_TO_FILE,
logging::LOCK_LOG_FILE,
logging::DELETE_OLD_LOG_FILE,
logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
#endif // !defined(NDEBUG)
// Enable trace control and transport through event tracing for Windows.
logging::LogEventProvider::Initialize(kRemotingHostLogProvider);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment