Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/native/clr/host/os-bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ void OSBridge::_monodroid_gref_logf (const char *format, ...) noexcept
[[gnu::always_inline, gnu::flatten]]
void OSBridge::log_it (LogCategories category, std::string_view const& line, FILE *to, const char *const from, bool logcat_enabled) noexcept
{
log_writef (category, LogLevel::Info, "%.*s", static_cast<int>(line.length ()), line.data ());
if (to == nullptr || logcat_enabled) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 💡 Testing — This predicate is now the contract separating compact (gref-/lref-), file-only, and file-plus-logcat modes, but the regression is covered only by manual validation. Please consider adding a focused test that exercises the routing combinations—especially to != nullptr && !logcat_enabled alongside the + case—so a future refactor cannot silently restore the logcat flood or suppress explicitly requested output.

Rule: Regression coverage

log_writef (category, LogLevel::Info, "%.*s", static_cast<int>(line.length ()), line.data ());
}

// We skip logcat here when logging to file is enabled because _write_stack_trace will output to logcat as well, if enabled
Comment thread
jonathanpeppers marked this conversation as resolved.
if (to == nullptr) {
Expand Down
Loading