Replace Console Logging with a File


  • Admin

    I'm thinking to replace the console with a simple log file. I'm only worried that we might get hit with file write permissions issues with windows 10. Based on this thread: https://superuser.com/questions/1031275/windows-allow-normal-non-elevated-programs-to-write-to-program-files-director, it looks like the file would be re-written to a proper location in the users home folder.

    There are some benefits to going to a simple file:

    • the file will always be there, no need to ask someone to replicate a problem with the console window open
    • we can set the log level to be debug and have the data just be written to file, it's okay if the log file gets a bit noisy
    • simpler code, the console window is troublesome in a couple of ways

    The enumerate threads feature is arguably one of the better ones. Unfortunately it's useful generally when the UI thread is locked up, which means you can't click the enumerate threads button (renders the feature moot).

    The 'available memory' button in the console is not very useful, so I think a file serves a lot of the same functionality as we get from the console window.


  • Admin

    This update has been made on the latest prerelease. I'm a bit concerned about windows10, if someone with that OS could download the latest prerelease and double check that they can start a single player game, that would be really appreciated.



  • Windows 10, v2.6.22472 64bit, just loaded 270BC and done turn 1 as Carthage, no errors.

    Can I check anything else?


  • Admin

    So far so good @TheDog . Last thing just to see what it looks like, can you find a 'triplea.log' file? It should likely be written somewhere in your user home folder, I think under 'local data' or something like that. I'm curious what the path is to that file, where it was written.



  • @LaFayette
    I cannot find it, I have a search going, it will take ages as its looking from c:\

    Did you use the Windows variable %USERNAME% in your path?



  • No it found nothing


  • Admin

    Would you mind checking explicitly for: C:\Users\username\AppData\Local\VirtualStore\Program Files<triplea>\triplea.log



  • @LaFayette

    The path only exists upto here
    C:\Users\username\AppData\Local\VirtualStore\

    I created the folder Program Files
    and then created Triplea within that folder

    just in case, but still its a no show.


  • Admin

    Which version of the engine are you running @TheDog ?



  • @LaFayette
    472
    I have just seen 2 more versions I will try the latest



  • Just tried 474, its not there.



  • Perhaps try the Windows environment variable %PUBLIC% c:\users\public at the same time as the current version?



  • Its 12:26 here in the UK, Im off to bed, I will try again tomorrow, unless someone else has nailed it.


  • Admin

    474 is the latest. Hmm, that's a small problem if it's not showing up. I have a suspicion the logger file is not being packaged with the game. I'll check that out, hopefully that is the missing piece. Thanks for your checks so far @TheDog ūüôā


  • Moderators Admin

    @LaFayette On my Windows10 the triplea.log file is - as usual - in the TripleA installation folder (22477). I use custom installation folders however.



  • For reference, I am a default installer.


  • Admin

    @Panther 'As usual' surprises me as the log file is new. Is this the installation log file? Sorry to be a bit confused, is 'as usual' referring to the log file being written to a usual location?

    Could you share the first dozen lines of that log file @Panther or let us know if it looks like an application log or an installation log?


  • Moderators Admin

    @LaFayette
    Sorry for the confusion. I am used to the fact that the enginge creates log-files in the installation directory. I was referring to the error.log file.

    These are the first lines of the triplea.log-file:

    297  15:09:59.314 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Classic @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_classic-master.zip!/world_war_ii_classic-master/map/games/classic.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Global 1942 2nd Edition @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/ww2global42_2nd_edition.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Pacific 1940 2nd Edition @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_pacific-master.zip!/world_war_ii_pacific-master/map/games/ww2pac40_2nd_edition.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II v5 1942 Second Edition @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v5_1942-master.zip!/world_war_ii_v5_1942-master/map/games/WW2v5_1942_2nd.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: 0 @ jar:file:/C:/Users/dh/triplea/downloadedMaps/0.zip!/games/0.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Revised @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_revised-master.zip!/world_war_ii_revised-master/map/games/ww2v2.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Global 1940 2nd Edition with Combat Move First @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/ww2global40_2ndEd_move1st.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II v3 1941 @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v3-master.zip!/world_war_ii_v3-master/map/games/WW2v3-1941.xml
    299  15:09:59.316 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: WW2v4 Six Army Free For All v2 @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v4-master.zip!/world_war_ii_v4-master/map/games/WW2v4_Six_Army_Free_For_All_v2.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: WW2 Path to Victory @ jar:file:/C:/Users/dh/triplea/downloadedMaps/ww2_path_to_victory-master.zip!/ww2_path_to_victory-master/map/games/ww2_path_to_victory.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Europe 1940 Original @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_europe-master.zip!/world_war_ii_europe-master/map/games/ww2eur40.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Global 1940 Canadian Mod with Combat Move First @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/G40CanadianMod.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: WWII Europe 1940 Original SeaLion-Balanced @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_europe-master.zip!/world_war_ii_europe-master/map/games/ww2eur40_veqryn_balanced.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Classic 3rd Edition @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_classic-master.zip!/world_war_ii_classic-master/map/games/classic_3rd_edition.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: Classic: Iron Blitz 3rd Edition @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_classic-master.zip!/world_war_ii_classic-master/map/games/iron_blitz.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Global 1940 Balanced Mod3 with Combat Move First @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/ww2global40_balanced_move1st.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Global 1940 2nd Edition @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/ww2global40_2nd_edition.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II v3 1942 @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v3-master.zip!/world_war_ii_v3-master/map/games/WW2v3-1942.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II v4 @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v4-master.zip!/world_war_ii_v4-master/map/games/WW2v4.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II v6 1941 @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v6_1941-master.zip!/world_war_ii_v6_1941-master/map/games/WW2v6_1941.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: WWII Pacific 1940 Original J1-Balanced @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_pacific-master.zip!/world_war_ii_pacific-master/map/games/ww2pac40_balanced_veqryn.xml
    300  15:09:59.317 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Revised LHTR @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_revised-master.zip!/world_war_ii_revised-master/map/games/lhtr.xml
    301  15:09:59.318 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II v5 1942 SE TR @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v5_1942-master.zip!/world_war_ii_v5_1942-master/map/games/WW2v5_1942_2nd_TR.xml
    301  15:09:59.318 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Pacific 1940 Original @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_pacific-master.zip!/world_war_ii_pacific-master/map/games/ww2pac40.xml
    301  15:09:59.318 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: Ozteas 1941 Global Setup @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/Ozteas_1941_Global_Setup.xml
    301  15:09:59.318 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Global 1940 Original @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/ww2global40.xml
    301  15:09:59.318 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Europe 1940 2nd Edition @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_europe-master.zip!/world_war_ii_europe-master/map/games/ww2eur40_2nd_edition.xml
    301  15:09:59.318 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: World War II Global 1940 Balanced Mod3 @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_global-master.zip!/world_war_ii_global-master/map/games/ww2global40_balanced.xml
    301  15:09:59.318 [Thread-2] DEBUG g.s.e.f.m.f.s.l.AvailableGamesFileSystemReader - Found game: WW2v4 Six Army Free For All @ jar:file:/C:/Users/dh/triplea/downloadedMaps/world_war_ii_v4-master.zip!/world_war_ii_v4-master/map/games/WW2v4_Six_Army_Free_For_All.xml
    
    

  • Admin

    Thanks @Panther , that is the application log file, that is the one we were looking for!

    Okay, is it the case that (?):

    • if you install TripleA to the default folder, it does not generate a log file,
    • if you install TripleA to a custom location, then it does?

  • Moderators Admin

    @LaFayette

    It looks like. On my system the installer wants to install into "C:\Program Files\TripleA".
    I am using "C:\Games\TripleA" instead.

    C:\Program Files\ is a somehow restricted system directory.


Log in to reply