1 // Copyright 2024 The Chromium Authors 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 BASE_LOGGING_RUST_LOG_INTEGRATION_H_ 6 #define BASE_LOGGING_RUST_LOG_INTEGRATION_H_ 7 8 #include "base/base_export.h" 9 #include "base/logging/log_severity.h" 10 11 namespace logging { 12 namespace internal { 13 14 // Receives a log line from Rust and forwards it to base logging, because 15 // logging::LogMessage is not accessible from Rust yet with our current interop 16 // tools. 17 // 18 // TODO(danakj): Should this helper function be replaced with C-like apis next 19 // to logging::LogMessage that Rust uses more directly? 20 void BASE_EXPORT print_rust_log(const char* msg, 21 const char* file, 22 int line, 23 LogSeverity severity, 24 bool verbose); 25 26 } // namespace internal 27 } // namespace logging 28 29 #endif // BASE_LOGGING_RUST_LOG_INTEGRATION_H_ 30