Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Side by Side Diff: remoting/host/logging_win.cc

Issue 11776029: Stop writing logs to %ProgramData%\Chromoting\debug.log (Windows only). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/logging.h" 5 #include "remoting/host/logging.h"
6 6
7 #include <guiddef.h> 7 #include <guiddef.h>
8 8
9 #include "base/file_path.h"
10 #include "base/logging.h" 9 #include "base/logging.h"
11 #include "base/logging_win.h" 10 #include "base/logging_win.h"
12 #include "remoting/host/branding.h"
13 11
14 // {2db51ca1-4fd8-4b88-b5a2-fb8606b66b02} 12 // {2db51ca1-4fd8-4b88-b5a2-fb8606b66b02}
15 const GUID kRemotingHostLogProvider = 13 const GUID kRemotingHostLogProvider =
16 { 0x2db51ca1, 0x4fd8, 0x4b88, 14 { 0x2db51ca1, 0x4fd8, 0x4b88,
17 { 0xb5, 0xa2, 0xfb, 0x86, 0x06, 0xb6, 0x6b, 0x02 } }; 15 { 0xb5, 0xa2, 0xfb, 0x86, 0x06, 0xb6, 0x6b, 0x02 } };
18 16
19 namespace remoting { 17 namespace remoting {
20 18
21 void InitHostLogging() { 19 void InitHostLogging() {
22 #if defined(NDEBUG) 20 // Write logs to the system debug log.
23 // Write logs to the system debug log in release build.
24 logging::InitLogging( 21 logging::InitLogging(
25 NULL, 22 NULL,
26 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, 23 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG,
27 logging::LOCK_LOG_FILE, 24 logging::DONT_LOCK_LOG_FILE,
28 logging::DELETE_OLD_LOG_FILE, 25 logging::DELETE_OLD_LOG_FILE,
29 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); 26 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
30 #else // !defined(NDEBUG)
31 // Write logs to a file in debug build.
32 FilePath debug_log = remoting::GetConfigDir().
33 Append(FILE_PATH_LITERAL("debug.log"));
34 logging::InitLogging(
35 debug_log.value().c_str(),
36 logging::LOG_ONLY_TO_FILE,
37 logging::LOCK_LOG_FILE,
38 logging::DELETE_OLD_LOG_FILE,
39 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
40 #endif // !defined(NDEBUG)
Jamie 2013/01/07 18:31:21 This disables logging entirely for debug builds, c
alexeypa (please no reviews) 2013/01/07 19:10:31 This disables logging to a file. Logging to ETW is
41 27
42 // Enable trace control and transport through event tracing for Windows. 28 // Enable trace control and transport through event tracing for Windows.
43 logging::LogEventProvider::Initialize(kRemotingHostLogProvider); 29 logging::LogEventProvider::Initialize(kRemotingHostLogProvider);
44 } 30 }
45 31
46 } // namespace remoting 32 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698