How do you enable logs?

The Kings Raven

Chieftain
Joined
Aug 28, 2016
Messages
22
I have hit a snag in my mod and civ now crashes when I try to start a new game.

I've seen a few people around here mention that they have seen things in the civ logs. How do I enable those logs and where do I find them once I do?
 
logs are at
C:\Users\YourName\Documents\My Games\Sid Meier's Civilization VI\Logs

I did not have to enable logging to get database.log reports on the errors being created by my mod(s).

[edit]there are bunches more files in that folder than there were in Civ5. I haven't figured it all out as yet. When you make a fatal error in your xml/sql, tho, you will get like 900 lines of error messages in database.log, and the game locks the database against any more changes.

All you have to do is exit and restart once you fix your error. I am not sure as yet whether exiting to main menu is good enough. Civ6 as it is currently configured is a bit quirky with respect to exiting to main menu: data in "LOC_" keys does not get preserved, as well as other sorts of things are lost when exiting to main menu (but will be correctly re-created when loading the game all the way again from desktop).
 
Last edited:
The two most important logs are the database.xml and the lua.xml.
The logs are always recording game data. There is nothing to turn on.
The logs reset when you start the entire game over.
I recommend checking the logs after loading an unmodded game so that you know what they are supposed to look like.
Then check the logs with your mod loaded. The logs will guide you in the direction of where your mistake is.

I was putting together a small xml mod and I was getting an error in the database log. It wasn't specific enough though. It seems the logs for Civ5 might be better. But this is just a first impression.
 
I was putting together a small xml mod and I was getting an error in the database log. It wasn't specific enough though. It seems the logs for Civ5 might be better. But this is just a first impression.
I agree that civ5 error messages in the database.log were a lot easier to follow what was wrong. Civ6 error messages are not nearly as helpful is my first impression too, but at least so far they always seem to reference the filename where the exception occured.

civ5 sql files with errors never told you the filename where the error occured (you had to compare timestamps between Database.log and Stopwatch.log to ferret out which file(s) the sql fatal error was coming from).
 
Back
Top Bottom