summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os.cpp15
-rw-r--r--core/os/os.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 93477f4288..b9daf6fa53 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -100,6 +100,21 @@ void OS::print(const char *p_format, ...) {
va_end(argp);
}
+void OS::print_rich(const char *p_format, ...) {
+ if (!_stdout_enabled) {
+ return;
+ }
+
+ va_list argp;
+ va_start(argp, p_format);
+
+ if (_logger) {
+ _logger->logv(p_format, argp, false);
+ }
+
+ va_end(argp);
+}
+
void OS::printerr(const char *p_format, ...) {
if (!_stderr_enabled) {
return;
diff --git a/core/os/os.h b/core/os/os.h
index c6ea9d869a..af6c38cbe0 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -120,6 +120,7 @@ public:
void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify = false, Logger::ErrorType p_type = Logger::ERR_ERROR);
void print(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
+ void print_rich(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
void printerr(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
virtual String get_stdin_string(bool p_block = true) = 0;