summaryrefslogtreecommitdiff
path: root/platform/iphone
diff options
context:
space:
mode:
Diffstat (limited to 'platform/iphone')
-rw-r--r--platform/iphone/os_iphone.cpp10
-rw-r--r--platform/iphone/os_iphone.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index 086cbe5010..5009f7d8ae 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -41,6 +41,7 @@
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
#include "core/project_settings.h"
+#include "drivers/unix/syslog_logger.h"
#include "sem_iphone.h"
@@ -98,6 +99,13 @@ void OSIPhone::initialize_core() {
SemaphoreIphone::make_default();
};
+void OSIPhone::initialize_logger() {
+ Vector<Logger *> loggers;
+ loggers.push_back(memnew(SyslogLogger));
+ loggers.push_back(memnew(RotatedFileLogger("user://logs/log.txt")));
+ _set_logger(memnew(CompositeLogger(loggers)));
+}
+
void OSIPhone::initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) {
supported_orientations = 0;
@@ -568,6 +576,8 @@ OSIPhone::OSIPhone(int width, int height) {
vm.resizable = false;
set_video_mode(vm);
event_count = 0;
+
+ _set_logger(memnew(SyslogLogger));
};
OSIPhone::~OSIPhone() {
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index 3ebd5a74db..11f4eed5e7 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -90,6 +90,7 @@ private:
virtual VideoMode get_default_video_mode() const;
+ virtual void initialize_logger();
virtual void initialize_core();
virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver);