summaryrefslogtreecommitdiffstats
path: root/skia/ext/google_logging.cc
blob: 72328b8b50faa23d459fa6f4bab6914b561be6c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file provides integration with Google-style "base/logging.h" assertions
// for Skia SkASSERT. If you don't want this, you can link with another file
// that provides integration with the logging of your choice.

#include "base/logging.h"
#include "base/string_util.h"

void SkDebugf_FileLine(const char* file, int line, bool fatal,
                       const char* format, ...) {
  va_list ap;
  va_start(ap, format);

  std::string msg;
  StringAppendV(&msg, format, ap);

  logging::LogMessage(file, line,
                      fatal ? logging::LOG_FATAL : logging::LOG_INFO).stream()
      << msg;
}