From 1a2311e3505765e37b736fe6bb46bb229e00701f Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Fri, 22 Sep 2017 12:56:02 +0700 Subject: Extract logging logic Previously logging logic was scattered over OS class implementations with plenty of duplication. Major changes in this commit: - Extracted logging logic into a separate Logger hierarchy. It allows easy configuration of logging mechanism depending on compile-time or run-time configuration. - Implemented RotatedFileLogger which is usually used with StdLogger, providing persistency of logs. It is often important to be able to obtain logs of the game even in production to be able to understand what happened prior to some problem. On mobile there previously was no way to obtain the logs aside from having the device connected to your machine. - flush() is not performed in release mode for every logged line. It is only performed for errors. --- core/os/file_access.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/os/file_access.h') diff --git a/core/os/file_access.h b/core/os/file_access.h index 34e7549fa3..455dd1ea99 100644 --- a/core/os/file_access.h +++ b/core/os/file_access.h @@ -119,6 +119,7 @@ public: virtual Error get_error() const = 0; ///< get last error + virtual void flush() = 0; virtual void store_8(uint8_t p_dest) = 0; ///< store a byte virtual void store_16(uint16_t p_dest); ///< store 16 bits uint virtual void store_32(uint32_t p_dest); ///< store 32 bits uint -- cgit v1.2.3