diff options
| author | Ruslan Mustakov | 2017-09-22 12:56:02 +0700 |
|---|---|---|
| committer | Ruslan Mustakov | 2017-09-25 16:19:21 +0700 |
| commit | 1a2311e3505765e37b736fe6bb46bb229e00701f (patch) | |
| tree | fd592573dbe7d95b89649eaa677bef54336c648e /platform/javascript/os_javascript.h | |
| parent | 14b4ad931f54c73aff9021a1314943278295e602 (diff) | |
| download | godot-1a2311e3505765e37b736fe6bb46bb229e00701f.tar.gz godot-1a2311e3505765e37b736fe6bb46bb229e00701f.tar.zst godot-1a2311e3505765e37b736fe6bb46bb229e00701f.zip | |
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.
Diffstat (limited to 'platform/javascript/os_javascript.h')
| -rw-r--r-- | platform/javascript/os_javascript.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 4c6469cb5..1c7bcfef4 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -92,6 +92,7 @@ public: virtual int get_audio_driver_count() const; virtual const char *get_audio_driver_name(int p_driver) const; + virtual void initialize_logger(); virtual void initialize_core(); virtual void initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver); @@ -104,11 +105,6 @@ public: //static OS* get_singleton(); - virtual void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) { - - OS::print_error(p_function, p_file, p_line, p_code, p_rationale, p_type); - } - virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); virtual void set_mouse_mode(MouseMode p_mode); |
