diff --git a/src/editor/godot_kotlin_jvm_editor.cpp b/src/editor/godot_kotlin_jvm_editor.cpp index 441ef177e8..f45153ddab 100644 --- a/src/editor/godot_kotlin_jvm_editor.cpp +++ b/src/editor/godot_kotlin_jvm_editor.cpp @@ -16,7 +16,7 @@ void GodotKotlinJvmEditor::on_file_system_dock_file_moved(// NOLINT(readability- const String& new_file ) { if (file.ends_with(String(".") + GODOT_JVM_REGISTRATION_FILE_EXTENSION)) { - JVM_WARNING( + JVM_LOG_WARNING( "You should not move registration files in the godot editor! Use the IDE for that. File moved: %s -> %s", file, new_file ); } @@ -26,7 +26,7 @@ void GodotKotlinJvmEditor::on_file_system_dock_file_removed(// NOLINT(readabilit const String& file ) { if (file.ends_with(String(".") + GODOT_JVM_REGISTRATION_FILE_EXTENSION)) { - JVM_WARNING("You should not remove registration files in the godot editor! Use the IDE for that. File removed: %s", file); + JVM_LOG_WARNING("You should not remove registration files in the godot editor! Use the IDE for that. File removed: %s", file); } } @@ -38,7 +38,7 @@ void GodotKotlinJvmEditor::on_file_system_dock_folder_moved(// NOLINT(readabilit String file_path = dir_access->get_next(); while (!file_path.is_empty()) { if (file_path.ends_with(String(".") + GODOT_JVM_REGISTRATION_FILE_EXTENSION)) { - JVM_WARNING("You should not move folders with registration files in the godot editor! Use the IDE for that. Folder moved: %s", folder); + JVM_LOG_WARNING("You should not move folders with registration files in the godot editor! Use the IDE for that. Folder moved: %s", folder); break; } file_path = dir_access->get_next(); diff --git a/src/gd_kotlin.cpp b/src/gd_kotlin.cpp index e9a1f72bc5..40223f01ad 100644 --- a/src/gd_kotlin.cpp +++ b/src/gd_kotlin.cpp @@ -36,14 +36,14 @@ void GDKotlin::fetch_user_configuration() { // The function is going to mutate the provided configuration with the valid values found in the file. // If some of the values parsed in the file are invalid, it will return true; - JVM_VERBOSE("Parsing JSON configuration file..."); + JVM_LOG_VERBOSE("Parsing JSON configuration file..."); invalid_file_content = JvmUserConfiguration::parse_configuration_json(content, user_configuration); if (invalid_file_content) { - JVM_WARNING("Configuration file is malformed. One or several settings might not be applied."); + JVM_LOG_WARNING("Configuration file is malformed. One or several settings might not be applied."); } } else { // No need for a warning, it's most likely the first time the project is run. - JVM_LOG("No JVM user_configuration file found. Default settings for your platform will be used."); + JVM_LOG_INFO("No JVM user_configuration file found. Default settings for your platform will be used."); } #ifdef TOOLS_ENABLED @@ -52,15 +52,15 @@ void GDKotlin::fetch_user_configuration() { if (invalid_file_content || !configuration_file_exist) { Ref file_access = FileAccess::open(JVM_CONFIGURATION_PATH, FileAccess::WRITE); String json = JvmUserConfiguration::export_configuration_to_json(user_configuration); - JVM_LOG("Writing a new configuration file to disk at %s", JVM_CONFIGURATION_PATH); + JVM_LOG_INFO("Writing a new configuration file to disk at %s", JVM_CONFIGURATION_PATH); file_access->store_string(json); } #endif HashMap cmd_argument_map; - JVM_VERBOSE("Parsing commandline arguments..."); + JVM_LOG_VERBOSE("Parsing commandline arguments..."); JvmUserConfiguration::parse_command_line(OS::get_singleton()->get_cmdline_args(), cmd_argument_map); - JVM_VERBOSE("Creating final JVM Configuration..."); + JVM_LOG_VERBOSE("Creating final JVM Configuration..."); JvmUserConfiguration::merge_with_command_line(user_configuration, cmd_argument_map); JvmUserConfiguration::sanitize_and_log_configuration(user_configuration); } @@ -83,7 +83,7 @@ void GDKotlin::set_jvm_options() { if (user_configuration.jvm_jmx_port >= 0) { jvm_options.add_jmx_option(user_configuration.jvm_jmx_port); } if (!Engine::get_singleton()->is_editor_hint() && !user_configuration.jvm_args.is_empty()) { - JVM_WARNING("You are using custom arguments for the JVM. Make sure they are valid or you risk the JVM to not " + JVM_LOG_WARNING("You are using custom arguments for the JVM. Make sure they are valid or you risk the JVM to not " "launch properly"); jvm_options.add_custom_options(user_configuration.jvm_args); } @@ -103,7 +103,7 @@ String GDKotlin::copy_new_file_to_user_dir(const String& file_name) { #ifndef __ANDROID__ if (!FileAccess::exists(file_user_path) || FileAccess::get_md5(file_user_path) != FileAccess::get_md5(file_res_path)) { - JVM_VERBOSE("%s file has changed. Copying it from res:// to user://.", file_name); + JVM_LOG_VERBOSE("%s file has changed. Copying it from res:// to user://.", file_name); #else // as per suggestion of https://developer.android.com/about/versions/14/behavior-changes-14#safer-dynamic-code-loading, we first delete existing files and then copy them again // if we don't do this, subsequent app starts where the files already exist, error out @@ -144,7 +144,7 @@ bool GDKotlin::load_bootstrap() { #endif JVM_ERR_FAIL_COND_V_MSG(!FileAccess::exists(bootstrap_jar), false, error_text); - JVM_VERBOSE("Loading bootstrap jar: %s", bootstrap_jar); + JVM_LOG_VERBOSE("Loading bootstrap jar: %s", bootstrap_jar); bootstrap_class_loader = ClassLoader::create_instance(env, bootstrap_jar, jni::JObject(nullptr)); bootstrap_class_loader->set_as_context_loader(env); @@ -181,7 +181,7 @@ bool GDKotlin::load_user_code() { #else String user_code_path {copy_new_file_to_user_dir(USER_CODE_FILE)}; #endif - JVM_VERBOSE("Loading usercode file at: %s", user_code_path); + JVM_LOG_VERBOSE("Loading usercode file at: %s", user_code_path); // TODO: Rework this part when cpp reloading done, can't check what's happening in the Kotlin code from here. ClassLoader* user_class_loader = ClassLoader::create_instance( env, @@ -264,7 +264,7 @@ bool GDKotlin::load_dynamic_lib() { #ifdef TOOLS_ENABLED else if (String environment_jvm = get_path_to_environment_jvm(); !environment_jvm.is_empty() && FileAccess::exists(environment_jvm)) { - JVM_WARNING("Godot-JVM: You really should embed a JRE in your project with jlink! See the " + JVM_LOG_WARNING("Godot-JVM: You really should embed a JRE in your project with jlink! See the " "documentation if you don't know how to do that"); path_to_jvm_lib = environment_jvm; } else { diff --git a/src/jvm_wrapper/bootstrap.cpp b/src/jvm_wrapper/bootstrap.cpp index 9bc732a40b..cdc90e997e 100644 --- a/src/jvm_wrapper/bootstrap.cpp +++ b/src/jvm_wrapper/bootstrap.cpp @@ -24,7 +24,7 @@ void Bootstrap::load_classes(JNIEnv* p_env, jobject p_this, jobjectArray p_class void Bootstrap::register_engine_type(JNIEnv* p_env, jobject p_this, jobjectArray p_classes_names, jobjectArray p_singleton_names) { #ifdef DEV_ENABLED - JVM_VERBOSE("Starting to register managed engine types..."); + JVM_LOG_VERBOSE("Starting to register managed engine types..."); #endif jni::Env env(p_env); @@ -39,7 +39,7 @@ void Bootstrap::register_engine_type(JNIEnv* p_env, jobject p_this, jobjectArray engine_types.delete_local_ref(env); singleton_names.delete_local_ref(env); #ifdef DEV_ENABLED - JVM_VERBOSE("Done registering managed engine types..."); + JVM_LOG_VERBOSE("Done registering managed engine types..."); #endif } diff --git a/src/jvm_wrapper/memory/memory_manager.cpp b/src/jvm_wrapper/memory/memory_manager.cpp index 1b515952ea..0403d1edb0 100644 --- a/src/jvm_wrapper/memory/memory_manager.cpp +++ b/src/jvm_wrapper/memory/memory_manager.cpp @@ -183,9 +183,9 @@ void MemoryManager::sync_memory(jni::Env& p_env) { } void MemoryManager::clean_up(jni::Env& p_env) { - JVM_VERBOSE("Cleaning JVM Memory..."); + JVM_LOG_VERBOSE("Cleaning JVM Memory..."); wrapped.call_void_method(p_env, CLEAN_UP); - JVM_VERBOSE("JVM Memory cleaned!"); + JVM_LOG_VERBOSE("JVM Memory cleaned!"); } void MemoryManager::queue_dead_object(Object* obj) { diff --git a/src/jvm_wrapper/memory/type_manager.cpp b/src/jvm_wrapper/memory/type_manager.cpp index 01230f1be7..0e8aa4cced 100644 --- a/src/jvm_wrapper/memory/type_manager.cpp +++ b/src/jvm_wrapper/memory/type_manager.cpp @@ -29,7 +29,7 @@ void TypeManager::register_engine_types(jni::Env& p_env, jni::JObjectArray& p_en engine_type_names.insert(i, class_name); java_engine_types_constructors[class_name] = i; #ifdef DEV_ENABLED - JVM_VERBOSE("Registered %s engine type with index %s.", class_name, i); + JVM_LOG_VERBOSE("Registered %s engine type with index %s.", class_name, i); #endif type.delete_local_ref(p_env); } diff --git a/src/kotlin_editor_export_plugin.cpp b/src/kotlin_editor_export_plugin.cpp index 1d768b621d..eb1799428e 100644 --- a/src/kotlin_editor_export_plugin.cpp +++ b/src/kotlin_editor_export_plugin.cpp @@ -14,7 +14,7 @@ static constexpr const char* all_jvm_feature {"export-all-jvm"}; static constexpr const char* ios_jdk_version {"21"}; void KotlinEditorExportPlugin::_export_begin(const HashSet& p_features, bool p_debug, const String& p_path, int p_flags) { - JVM_LOG("Beginning Godot-Jvm specific exports."); + JVM_LOG_INFO("Beginning Godot-Jvm specific exports."); // Add mandatory jars to pck Vector files_to_add; @@ -156,10 +156,10 @@ void KotlinEditorExportPlugin::_export_begin(const HashSet& p_features, JVM_ERR_FAIL_MSG("File can't be found, it won't be exported: %s", file_to_add); } add_file(file_to_add, FileAccess::get_file_as_bytes(file_to_add), false); - JVM_LOG("Exporting %s", file_to_add); + JVM_LOG_INFO("Exporting %s", file_to_add); } - JVM_LOG("Finished Godot-Jvm specific exports."); + JVM_LOG_INFO("Finished Godot-Jvm specific exports."); } void KotlinEditorExportPlugin::_generate_export_configuration_file(jni::JvmType vm_type) { diff --git a/src/lifecycle/jvm_manager.cpp b/src/lifecycle/jvm_manager.cpp index add8538c43..bba5af14a0 100644 --- a/src/lifecycle/jvm_manager.cpp +++ b/src/lifecycle/jvm_manager.cpp @@ -67,7 +67,7 @@ bool JvmManager::initialize_or_get_jvm(void* lib_handle, JvmUserConfiguration& u std::locale global; - JVM_VERBOSE("Starting JVM ..."); + JVM_LOG_VERBOSE("Starting JVM ..."); JNIEnv* jni_env {nullptr}; CreateJavaVM func {get_create_jvm_function(lib_handle)}; @@ -84,7 +84,7 @@ bool JvmManager::initialize_or_get_jvm(void* lib_handle, JvmUserConfiguration& u JVM_ERR_FAIL_COND_V_MSG(result != JNI_OK, false, "Failed to create a new vm!"); #elif defined PROVIDED_JVM - JVM_VERBOSE("Retrieving existing JVM ..."); + JVM_LOG_VERBOSE("Retrieving existing JVM ..."); jni::Env env {get_jni_env()}; java_vm = env.get_jvm(); #else @@ -168,7 +168,7 @@ void JvmManager::destroy_jni_classes() { void JvmManager::close_jvm() { #if defined DYNAMIC_JVM || defined STATIC_JVM - JVM_VERBOSE("Shutting down JVM ..."); + JVM_LOG_VERBOSE("Shutting down JVM ..."); jni::Jvm::destroy(); #endif } diff --git a/src/lifecycle/jvm_options.cpp b/src/lifecycle/jvm_options.cpp index 84f038cb22..44e3e12ea4 100644 --- a/src/lifecycle/jvm_options.cpp +++ b/src/lifecycle/jvm_options.cpp @@ -25,7 +25,7 @@ void JvmOptions::add_jmx_option(uint16_t p_port) { options.push_back("-Dcom.sun.management.jmxremote.local.only=false"); options.push_back("-Dcom.sun.management.jmxremote.authenticate=false"); options.push_back("-Dcom.sun.management.jmxremote.ssl=false"); - JVM_VERBOSE("Started JMX on port: %s", jvm_jmx_port); + JVM_LOG_VERBOSE("Started JMX on port: %s", jvm_jmx_port); } void JvmOptions::add_custom_options(const String& custom_options) { diff --git a/src/lifecycle/jvm_user_configuration.cpp b/src/lifecycle/jvm_user_configuration.cpp index 20d2c968c4..4ef8f80eb4 100644 --- a/src/lifecycle/jvm_user_configuration.cpp +++ b/src/lifecycle/jvm_user_configuration.cpp @@ -26,7 +26,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.vm_type = jni::JvmType::ART; } else { is_invalid = true; - JVM_WARNING("Wrong JVM type in configuration file: %s. It will be ignored", value);; + JVM_LOG_WARNING("Wrong JVM type in configuration file: %s. It will be ignored", value);; } json_dict.erase(VM_TYPE_JSON_IDENTIFIER); } @@ -39,7 +39,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.use_debug = false; } else { is_invalid = true; - JVM_WARNING("Invalid Use Debug value in configuration file: %s. It will be ignored", boolean); + JVM_LOG_WARNING("Invalid Use Debug value in configuration file: %s. It will be ignored", boolean); } json_dict.erase(USE_DEBUG_JSON_IDENTIFIER); } @@ -50,7 +50,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.jvm_debug_port = port; } else { is_invalid = true; - JVM_WARNING("Invalid JVM port value in configuration file: %s. It will be ignored", port); + JVM_LOG_WARNING("Invalid JVM port value in configuration file: %s. It will be ignored", port); } json_dict.erase(DEBUG_PORT_JSON_IDENTIFIER); } @@ -61,7 +61,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.jvm_debug_address = address; } else { is_invalid = true; - JVM_WARNING("Invalid JVM address value in configuration file: %s. It will be ignored", address); + JVM_LOG_WARNING("Invalid JVM address value in configuration file: %s. It will be ignored", address); } json_dict.erase(DEBUG_ADDRESS_JSON_IDENTIFIER); } @@ -74,7 +74,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.wait_for_debugger = false; } else { is_invalid = true; - JVM_WARNING("Invalid Waiting for Debugger value in configuration file: %s. It will be ignored", boolean); + JVM_LOG_WARNING("Invalid Waiting for Debugger value in configuration file: %s. It will be ignored", boolean); } json_dict.erase(WAIT_FOR_DEBUGGER_JSON_IDENTIFIER); } @@ -85,7 +85,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.jvm_jmx_port = port; } else { is_invalid = true; - JVM_WARNING("Invalid JMX port value in configuration file: %s. It will be ignored", port); + JVM_LOG_WARNING("Invalid JMX port value in configuration file: %s. It will be ignored", port); } json_dict.erase(JMX_PORT_JSON_IDENTIFIER); } @@ -96,7 +96,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.max_string_size = size; } else { is_invalid = true; - JVM_WARNING("Invalid Maximum String Size value in configuration file: %s. It will be ignored", size); + JVM_LOG_WARNING("Invalid Maximum String Size value in configuration file: %s. It will be ignored", size); } json_dict.erase(MAX_STRING_SIZE_JSON_IDENTIFIER); } @@ -109,7 +109,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J json_config.disable_gc = false; } else { is_invalid = true; - JVM_WARNING("Invalid Disable GC value in configuration file: %s. It will be ignored", boolean); + JVM_LOG_WARNING("Invalid Disable GC value in configuration file: %s. It will be ignored", boolean); } json_dict.erase(DISABLE_GC_JSON_IDENTIFIER); } @@ -123,13 +123,13 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J String version {json_dict[VERSION_JSON_IDENTIFIER]}; JVM_DEV_VERBOSE("Value for json argument: %s -> %s", VERSION_JSON_IDENTIFIER, version); if (version != JSON_ARGUMENT_VERSION) { - JVM_WARNING("Your existing jvm json configuration file was made for an older version of this binding. A " + JVM_LOG_WARNING("Your existing jvm json configuration file was made for an older version of this binding. A " "new will one will be created. Your previous settings should remain if compatible."); is_invalid = true; } json_dict.erase(VERSION_JSON_IDENTIFIER); } else { - JVM_WARNING("No version found in the configuration file"); + JVM_LOG_WARNING("No version found in the configuration file"); is_invalid = true; } @@ -138,7 +138,7 @@ bool JvmUserConfiguration::parse_configuration_json(const String& json_string, J for (int i = 0; i < keys.size(); i++) { String key = keys[i]; String value = json_dict[key]; - JVM_WARNING("Invalid json configuration argument name: %s", key); + JVM_LOG_WARNING("Invalid json configuration argument name: %s", key); } is_invalid = true; } @@ -232,7 +232,7 @@ void JvmUserConfiguration::parse_command_line(const List& args, HashMap< } else if (value == ART_STRING) { configuration_map[VM_TYPE_CMD_IDENTIFIER] = jni::JvmType::ART; } else { - JVM_WARNING("Wrong JVM type in command line arguments: %s. It will be ignored", value);; + JVM_LOG_WARNING("Wrong JVM type in command line arguments: %s. It will be ignored", value);; } } else if (identifier == USE_DEBUG_CMD_IDENTIFIER) { configuration_map[USE_DEBUG_CMD_IDENTIFIER] = get_cmd_bool_or_default(value, TRUE_STRING); @@ -242,13 +242,13 @@ void JvmUserConfiguration::parse_command_line(const List& args, HashMap< if (port >= 0 && port <= 65535) { configuration_map[DEBUG_PORT_CMD_IDENTIFIER] = port; } else { - JVM_WARNING("Invalid JVM port value in command line arguments: %s. It will be ignored", port); + JVM_LOG_WARNING("Invalid JVM port value in command line arguments: %s. It will be ignored", port); } } else if (identifier == DEBUG_ADDRESS_CMD_IDENTIFIER) { if (value.is_valid_ip_address()) { configuration_map[DEBUG_ADDRESS_CMD_IDENTIFIER] = value; } else { - JVM_WARNING("Invalid JVM address value command line arguments: %s. It will be ignored", value);; + JVM_LOG_WARNING("Invalid JVM address value command line arguments: %s. It will be ignored", value);; } } else if (identifier == WAIT_FOR_DEBUGGER_CMD_IDENTIFIER) { configuration_map[WAIT_FOR_DEBUGGER_CMD_IDENTIFIER] = get_cmd_bool_or_default(value, TRUE_STRING); @@ -258,7 +258,7 @@ void JvmUserConfiguration::parse_command_line(const List& args, HashMap< if (port >= 0 && port <= 65535) { configuration_map[JMX_PORT_CMD_IDENTIFIER] = port; } else { - JVM_WARNING("Invalid JMX port value command line arguments: %s. It will be ignored", port); + JVM_LOG_WARNING("Invalid JMX port value command line arguments: %s. It will be ignored", port); } } else if (identifier == MAX_STRING_SIZE_CMD_IDENTIFIER) { int64_t size = -1; @@ -266,7 +266,7 @@ void JvmUserConfiguration::parse_command_line(const List& args, HashMap< if (value.is_valid_int() && size >= -1) { configuration_map[MAX_STRING_SIZE_CMD_IDENTIFIER] = size; } else { - JVM_WARNING("Invalid Maximum String Size value in configuration file: %s. It will be ignored", size); + JVM_LOG_WARNING("Invalid Maximum String Size value in configuration file: %s. It will be ignored", size); } } else if (identifier == DISABLE_GC_CMD_IDENTIFIER) { configuration_map[DISABLE_GC_CMD_IDENTIFIER] = get_cmd_bool_or_default(value, TRUE_STRING); @@ -304,7 +304,7 @@ void JvmUserConfiguration::merge_with_command_line(JvmUserConfiguration& json_co void JvmUserConfiguration::sanitize_and_log_configuration(JvmUserConfiguration& config) { if (config.max_string_size != -1) { - JVM_WARNING( + JVM_LOG_WARNING( "The max string size was changed to %s which can modify the size of the shared buffer. " "Be aware that it might impact performance and memory usage.", config.max_string_size @@ -312,48 +312,48 @@ void JvmUserConfiguration::sanitize_and_log_configuration(JvmUserConfiguration& } if (config.disable_leak_warning_on_close) { - JVM_WARNING("You won't be notified if your Kotlin code got instances leaking"); + JVM_LOG_WARNING("You won't be notified if your Kotlin code got instances leaking"); } if (!config.jvm_args.is_empty()) { - JVM_WARNING("Custom JVM arguments are provided, be sure they are valid: %s", config.jvm_args); + JVM_LOG_WARNING("Custom JVM arguments are provided, be sure they are valid: %s", config.jvm_args); } #ifdef __ANDROID__ if (config.vm_type == jni::JvmType::NONE) { config.vm_type = jni::JvmType::ART; - JVM_LOG("You are running on Android. VM automatically set to ART"); + JVM_LOG_INFO("You are running on Android. VM automatically set to ART"); } else if (config.vm_type != jni::JvmType::ART) { config.vm_type = jni::JvmType::ART; - JVM_WARNING("You are running on Android. Switching VM to ART"); + JVM_LOG_WARNING("You are running on Android. Switching VM to ART"); } #elif IOS_ENABLED if (config.vm_type == jni::JvmType::NONE) { config.vm_type = jni::JvmType::GRAAL_NATIVE_IMAGE; - JVM_LOG("You are running on iOS. VM automatically set to Graal native_image"); + JVM_LOG_INFO("You are running on iOS. VM automatically set to Graal native_image"); } else if (config.vm_type != jni::JvmType::GRAAL_NATIVE_IMAGE) { config.vm_type = jni::JvmType::GRAAL_NATIVE_IMAGE; - JVM_WARNING("You are running on iOS. Switching VM to Graal native_image"); + JVM_LOG_WARNING("You are running on iOS. Switching VM to Graal native_image"); } #else if (config.vm_type == jni::JvmType::NONE) { config.vm_type = jni::JvmType::JVM; - JVM_LOG("You are running on desktop. VM automatically set to JVM"); + JVM_LOG_INFO("You are running on desktop. VM automatically set to JVM"); } else if (config.vm_type == jni::JvmType::ART) { config.vm_type = jni::JvmType::JVM; - JVM_WARNING("You can't run ART on desktop. Switching VM to JVM"); + JVM_LOG_WARNING("You can't run ART on desktop. Switching VM to JVM"); } #endif else { switch (config.vm_type) { case jni::JvmType::JVM: - JVM_LOG("VM set to %s", JVM_STRING); + JVM_LOG_INFO("VM set to %s", JVM_STRING); break; case jni::JvmType::GRAAL_NATIVE_IMAGE: - JVM_LOG("VM set to %s", GRAAL_NATIVE_IMAGE_STRING); + JVM_LOG_INFO("VM set to %s", GRAAL_NATIVE_IMAGE_STRING); break; case jni::JvmType::ART: - JVM_LOG("VM set to %s", ART_STRING); + JVM_LOG_INFO("VM set to %s", ART_STRING); break; case jni::JvmType::NONE: // Should never happen. diff --git a/src/logging.h b/src/logging.h index 920f1a1e2e..f7fcd95449 100644 --- a/src/logging.h +++ b/src/logging.h @@ -9,9 +9,9 @@ inline String format_prefix{"Godot-JVM: "}; #define JVM_STRING_FORMAT(message, ...) vformat(format_prefix + message, ##__VA_ARGS__) -#define JVM_LOG(message, ...) print_line(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) -#define JVM_VERBOSE(message, ...) print_verbose(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) (void) 0 -#define JVM_WARNING(message, ...) WARN_PRINT(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) +#define JVM_LOG_INFO(message, ...) print_line(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) +#define JVM_LOG_VERBOSE(message, ...) print_verbose(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) (void) 0 +#define JVM_LOG_WARNING(message, ...) WARN_PRINT(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) #ifdef TOOLS_ENABLED #define JVM_ERR_FAIL_MSG(message, ...) ERR_FAIL_EDMSG(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) @@ -22,7 +22,6 @@ inline String format_prefix{"Godot-JVM: "}; #define JVM_ERR_FAIL_COND_V_MSG(condition, ret_var, message, ...) \ ERR_FAIL_COND_V_EDMSG(condition, ret_var, JVM_STRING_FORMAT(message, ##__VA_ARGS__)) #else -#define JVM_ERR_CONTINUE_MSG(message) , ... ERR_PRINT_ED(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) #define JVM_ERR_FAIL_MSG(message, ...) ERR_FAIL_MSG(JVM_STRING_FORMAT(message, ##__VA_ARGS__)) #define JVM_ERR_FAIL_V_MSG(ret_var, message, ...) \ ERR_FAIL_V_MSG(ret_var, JVM_STRING_FORMAT(message, ##__VA_ARGS__)) @@ -33,8 +32,8 @@ inline String format_prefix{"Godot-JVM: "}; #endif #ifdef DEV_ENABLED -#define JVM_DEV_LOG(message, ...) JVM_LOG(message, ##__VA_ARGS__) -#define JVM_DEV_VERBOSE(message, ...) JVM_VERBOSE(message, ##__VA_ARGS__) +#define JVM_DEV_LOG(message, ...) JVM_LOG_INFO(message, ##__VA_ARGS__) +#define JVM_DEV_VERBOSE(message, ...) JVM_LOG_VERBOSE(message, ##__VA_ARGS__) #define JVM_DEV_ASSERT(m_cond, message, ...) \ if (unlikely(!(m_cond))) { \ _err_print_error(FUNCTION_STR, __FILE__, __LINE__, JVM_STRING_FORMAT(message, ##__VA_ARGS__)); \ diff --git a/src/resource_format/jvm_resource_format_saver.cpp b/src/resource_format/jvm_resource_format_saver.cpp index ab4f5ea462..68a3c64a51 100644 --- a/src/resource_format/jvm_resource_format_saver.cpp +++ b/src/resource_format/jvm_resource_format_saver.cpp @@ -20,7 +20,7 @@ Error JvmResourceFormatSaver::save(const Ref& p_resource, const String ERR_FAIL_COND_V(kotlin_script.is_null(), ERR_INVALID_PARAMETER); if (!FileAccess::exists(p_path) && p_path.get_extension() == GODOT_JVM_REGISTRATION_FILE_EXTENSION) { - JVM_WARNING("It's not recommended to create .gdj files directly as they are generated automatically from jvm source files " + JVM_LOG_WARNING("It's not recommended to create .gdj files directly as they are generated automatically from jvm source files " "when building your project.\n" "Register a class with a matching name if you don't want this file to get deleted the next " "time you build."); diff --git a/src/script/jvm_script_manager.h b/src/script/jvm_script_manager.h index c95f52aca5..d3518c3935 100644 --- a/src/script/jvm_script_manager.h +++ b/src/script/jvm_script_manager.h @@ -54,7 +54,7 @@ Ref