| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SYNC_UTIL_LOGGING_H_ | |
| 6 #define CHROME_BROWSER_SYNC_UTIL_LOGGING_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/logging.h" | |
| 10 | |
| 11 // TODO(akalin): This probably belongs in base/ somewhere. | |
| 12 | |
| 13 namespace tracked_objects { | |
| 14 class Location; | |
| 15 } // namespace tracked_objects | |
| 16 | |
| 17 namespace browser_sync { | |
| 18 | |
| 19 bool VlogIsOnForLocation(const tracked_objects::Location& from_here, | |
| 20 int verbose_level); | |
| 21 | |
| 22 } // namespace browser_sync | |
| 23 | |
| 24 #define VLOG_LOC_STREAM(from_here, verbose_level) \ | |
| 25 logging::LogMessage(from_here.file_name(), from_here.line_number(), \ | |
| 26 -verbose_level).stream() | |
| 27 | |
| 28 #define DVLOG_LOC(from_here, verbose_level) \ | |
| 29 LAZY_STREAM( \ | |
| 30 VLOG_LOC_STREAM(from_here, verbose_level), \ | |
| 31 ::logging::DEBUG_MODE && \ | |
| 32 (VLOG_IS_ON(verbose_level) || \ | |
| 33 ::browser_sync::VlogIsOnForLocation(from_here, verbose_level))) \ | |
| 34 | |
| 35 #endif // CHROME_BROWSER_SYNC_UTIL_LOGGING_H_ | |
| OLD | NEW |