OLD | NEW |
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 // This file provides integration with Google-style "base/logging.h" assertions | 5 // This file provides integration with Google-style "base/logging.h" assertions |
6 // for Skia SkASSERT. If you don't want this, you can link with another file | 6 // for Skia SkASSERT. If you don't want this, you can link with another file |
7 // that provides integration with the logging of your choice. | 7 // that provides integration with the logging of your choice. |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "third_party/skia/include/core/SkTypes.h" | 11 #include "third_party/skia/include/core/SkTypes.h" |
12 | 12 |
13 void SkDebugf_FileLine(const char* file, int line, bool fatal, | 13 void SkDebugf_FileLine(const char* file, int line, bool fatal, |
14 const char* format, ...) { | 14 const char* format, ...) { |
15 va_list ap; | 15 va_list ap; |
16 va_start(ap, format); | 16 va_start(ap, format); |
17 | 17 |
18 std::string msg; | 18 std::string msg; |
19 base::StringAppendV(&msg, format, ap); | 19 base::StringAppendV(&msg, format, ap); |
20 va_end(ap); | 20 va_end(ap); |
21 | 21 |
22 logging::LogMessage(file, line, | 22 logging::LogMessage(file, line, |
23 fatal ? logging::LOG_FATAL : logging::LOG_INFO).stream() | 23 fatal ? logging::LOG_FATAL : logging::LOG_INFO).stream() |
24 << msg; | 24 << msg; |
25 } | 25 } |
OLD | NEW |