summaryrefslogtreecommitdiffstats
path: root/chromium/base/logging.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-01-23 17:21:03 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-01-23 16:25:15 +0000
commitc551f43206405019121bd2b2c93714319a0a3300 (patch)
tree1f48c30631c421fd4bbb3c36da20183c8a2ed7d7 /chromium/base/logging.cc
parent7961cea6d1041e3e454dae6a1da660b453efd238 (diff)
BASELINE: Update Chromium to 79.0.3945.139
Change-Id: I336b7182fab9bca80b709682489c07db112eaca5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/logging.cc')
-rw-r--r--chromium/base/logging.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/chromium/base/logging.cc b/chromium/base/logging.cc
index 04aabb67465..282b26ff4cf 100644
--- a/chromium/base/logging.cc
+++ b/chromium/base/logging.cc
@@ -858,9 +858,13 @@ LogMessage::~LogMessage() {
fx_logger_t* logger = fx_log_get_logger();
if (logger) {
- // Temporarily pop the trailing newline, since fx_logger will add one.
+ // Temporarily remove the trailing newline from |str_newline|'s C-string
+ // representation, since fx_logger will add a newline of its own.
str_newline.pop_back();
- fx_logger_log(logger, severity, nullptr, str_newline.c_str());
+ std::string message =
+ base::StringPrintf("%s(%d) %s", file_basename_, line_,
+ str_newline.c_str() + message_start_);
+ fx_logger_log(logger, severity, nullptr, message.data());
str_newline.push_back('\n');
}
#endif // OS_FUCHSIA
@@ -962,6 +966,9 @@ void LogMessage::Init(const char* file, int line) {
if (last_slash_pos != base::StringPiece::npos)
filename.remove_prefix(last_slash_pos + 1);
+ // Stores the base name as the null-terminated suffix substring of |filename|.
+ file_basename_ = filename.data();
+
// TODO(darin): It might be nice if the columns were fixed width.
stream_ << '[';