Skip to content

Commit 63c42a5

Browse files
committed
Remove logging that's not necessary for Release
1 parent fa405a6 commit 63c42a5

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/Mono.Android/Java.Interop/TypeManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ static Type monovm_typemap_java_to_managed (string java_type_name)
247247
}
248248
}
249249

250-
Logger.Log (LogLevel.Info, "monodroid", $"Loaded type: {ret}");
251250
return ret;
252251
}
253252

src/native/clr/host/assembly-store.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ auto AssemblyStore::open_assembly (std::string_view const& name, int64_t &size)
209209

210210
const AssemblyStoreIndexEntry *hash_entry = find_assembly_store_entry (name_hash, assembly_store_hashes, assembly_store.index_entry_count);
211211
if (hash_entry == nullptr) {
212-
log_warn (LOG_ASSEMBLY, "Assembly '{}' (hash 0x{:x}) not found"sv, optional_string (name.data ()), name_hash);
212+
// This message should really be `log_warn`, but since CoreCLR attempts to load `AssemblyName.ni.dll` for each
213+
// `AssemblyName.dll`, it creates a lot of non-actionable noise.
214+
// TODO: generate hashes for the .ni.dll names and ignore them at the top of the function. Then restore
215+
// `log_warn` here.
216+
log_debug (LOG_ASSEMBLY, "Assembly '{}' (hash 0x{:x}) not found"sv, optional_string (name.data ()), name_hash);
213217
return nullptr;
214218
}
215219

src/native/clr/host/host-jni.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ using namespace xamarin::android;
88
JNIEXPORT jint JNICALL
99
JNI_OnLoad (JavaVM *vm, void *reserved)
1010
{
11-
log_write (LOG_DEFAULT, LogLevel::Info, "JNI_OnLoad");
12-
1311
return Host::Java_JNI_OnLoad (vm, reserved);
1412
}
1513

src/native/clr/host/host.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,6 @@ auto Host::get_java_class_name_for_TypeManager (jclass klass) noexcept -> char*
567567

568568
auto Host::Java_JNI_OnLoad (JavaVM *vm, [[maybe_unused]] void *reserved) noexcept -> jint
569569
{
570-
log_write (LOG_DEFAULT, LogLevel::Info, "Host OnLoad");
571570
jvm = vm;
572571

573572
JNIEnv *env = nullptr;

src/native/clr/include/runtime-base/android-system.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ namespace xamarin::android {
9191
}
9292
}
9393

94-
log_warn (LOG_DEFAULT, "Creating public update directory: `{}`", override_dir);
94+
log_debug (LOG_DEFAULT, "Creating public update directory: `{}`", override_dir);
9595
Util::create_public_directory (override_dir);
9696
}
9797

src/native/clr/runtime-base/util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void
5252
Util::create_public_directory (std::string_view const& dir)
5353
{
5454
mode_t m = umask (0);
55-
int ret = mkdir (dir.data (), 0777);
55+
int ret = create_directory (dir.data (), 0777);
5656
if (ret < 0) {
5757
if (errno == EEXIST) {
5858
// Try to change the mode, just in case

0 commit comments

Comments
 (0)