This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hey all;

I've tried to log errors, so I can figure out the error which closed the program. My current setup is as follows:

Project Settings -> Logging -> Enable File logging: True
Project Settings -> Logging -> Enable File logging.pc: True
Logpath: output/output.log (I create this folder on run)
Max Log Files:5

It logs fine, up until the error occurs. From my understanding the error should be logged as well, but it does not. Here's an example of a log file:

Godot Engine v3.2.3.stable.mono.official - https://godotengine.org
OpenGL ES 3.0 Renderer: GeForce RTX 2070/PCIe/SSE2

Mono: Log file is: 'C:/Users//AppData/Roaming/Godot/appuserdata/endless-runner-v2/mono/monologs/20201221 13.03.14 (17128).txt'
Editions/Cowboy

It crashed at this point due to the program not being able to find a folder, which I forgot to create. But the error was never logged. The error appears shortly in the debug window, so the only way to find it was to monitor the debug log.

This is a pretty important feature to work for me, since without it makes debugging errors on releases impossible. From what I could read, this should work, so I think the error might be releated to C#, but I'm unsure. Anyone have an idea how to fix this
?

Godot version 3.2.3
in Engine by (22 points)

While I don't know any Godot-specific details, I assume this is related to the flush timing of the stdout/stderr streams. AFAIK, there's no way to control that timing in Godot.

For performance reasons, most logging implementations don't write each log request immediately to disk. Instead, the requests are held in memory and then batched to disk periodically. So, I'd guess that a set of log entries are in the write buffer at the time the crash happens, and therefore never make it to disk.

In case you haven't see it, here's a good article on Godot debug logging:

https://medium.com/@silocoder/using-log-files-to-debug-godot-game-engine-apps-14c191df6580

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.