1 // Copyright 2017 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.
5 #include "base/fuchsia/fuchsia_logging.h"
7 #include <zircon/status.h>
13 ZxLogMessage::ZxLogMessage(const char* file_path,
17 : LogMessage(file_path, line, severity), zx_err_(zx_err) {}
19 ZxLogMessage::~ZxLogMessage() {
20 // zx_status_t error values are negative, so log the numeric version as
21 // decimal rather than hex. This is also useful to match zircon/errors.h for
23 stream() << ": " << zx_status_get_string(zx_err_) << " (" << zx_err_ << ")";
26 } // namespace logging