You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Enable file logging by default on desktops to help with troubleshooting
- Use the `.log` file extension (recognized on Windows out of the box)
to better hint that generated files are logs. Some editors provide
dedicated syntax highlighting for those files.
- Use an underscore to separate the basename from the date and
the date from the time in log filenames. This makes the filename
easier to read.
- Keep only 5 log files by default to decrease disk usage in case
messages are spammed.
(cherry picked from commit 20af28ec06)
This commit is contained in:
committed by
Rémi Verschelde
parent
a0f0aa1741
commit
c2a4ce9380
@@ -154,7 +154,7 @@ void RotatedFileLogger::rotate_file() {
|
||||
char timestamp[21];
|
||||
OS::Date date = OS::get_singleton()->get_date();
|
||||
OS::Time time = OS::get_singleton()->get_time();
|
||||
sprintf(timestamp, "-%04d-%02d-%02d-%02d-%02d-%02d", date.year, date.month, date.day, time.hour, time.min, time.sec);
|
||||
sprintf(timestamp, "_%04d-%02d-%02d_%02d-%02d-%02d", date.year, date.month, date.day, time.hour, time.min, time.sec);
|
||||
|
||||
String backup_name = base_path.get_basename() + timestamp;
|
||||
if (base_path.get_extension() != String()) {
|
||||
|
||||
Reference in New Issue
Block a user