1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

How do you enable logs?

Discussion in 'Civ6 - Creation & Customization' started by The Kings Raven, Oct 26, 2016.

  1. The Kings Raven

    The Kings Raven Chieftain

    Joined:
    Aug 28, 2016
    Messages:
    21
    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?
     
  2. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    6,862
    Location:
    Illinois, USA
    logs are at
    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: Oct 26, 2016
    The Kings Raven likes this.
  3. UncivilizedGuy

    UncivilizedGuy The Village Idiot

    Joined:
    May 24, 2012
    Messages:
    860
    Location:
    Land of the Lost
    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.
     
  4. The Kings Raven

    The Kings Raven Chieftain

    Joined:
    Aug 28, 2016
    Messages:
    21
    Thanks. Looks like Database.log is the one :)
     
  5. LeeS

    LeeS Imperator Supporter

    Joined:
    Jul 23, 2013
    Messages:
    6,862
    Location:
    Illinois, USA
    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).
     

Share This Page