I'm trying to enable file logging only if a specific debug code is entered, though I can't get it working. Logging works just fine if I enable it from the project settings window but it won't create a log file if I enable it through code:
Example:
func _ready():
print(ProjectSettings.get_setting("logging/file_logging/enable_file_logging"))
# prints "False"
ProjectSettings.set("logging/file_logging/enable_file_logging", true)
print(ProjectSettings.get_setting("logging/file_logging/enable_file_logging"))
# prints "True"
# ...but it doesn't create a log file, no matter if i disable it later or not
Any thoughts? Or would you suggest an alternative method for logging?