in what folder are my logs?

Started by Monsieur OUXX, Tue 11/07/2017 09:36:41

Previous topic - Next topic

Monsieur OUXX

I'm so confused: I've been using this logging technique for several projects already and usually I have no issues.
I'm sure it's not even a problem with AGS or Windows' location of personal app data. I'm sure it's just be being blind and stupid.

LOGGING MODULE CODE:
Code: ags


String fName;

static void Console::ResetLog(String name)
{
    //overwrite the existing file and write something into it to give it a physical existence, then close it.
    fName = name;
    File* f = File.Open(fName, eFileWrite);
    f.WriteRawLine("");
    f.Close();
}

static void Console::W2(String s)
{
    //I'm doing this (open, append, close) to ensure that each output is actually flushed to the file in case the game crashes.
    // It's a very reliant technique.
    File* f = File.Open(fName, eFileAppend);
    f.WriteRawLine(s);
    f.Close();
}

void game_start()
{
    Console.ResetLog("SelfGenLog.txt");
}



During the game I write many things to the logs. I set a breakpoint inside Console::W2 and it actually goes through there.
And yet I can't find "SelfGenLog.txt". What am I missing?
 

Gurok

For me, generated data files are located in:

C:\ProgramData\Adventure Game Studio\(name of game)

Have you looked there?

You say that you've used this project for various projects in the past. Have you verified that one of these projects generates logs correctly recently? AGS' handling of game-generated files changed a while ago, and that may be why you're having trouble finding the files.
[img]http://7d4iqnx.gif;rWRLUuw.gi

Monsieur OUXX

Quote from: Gurok on Tue 11/07/2017 10:01:04
C:\ProgramData\Adventure Game Studio\(name of game)
That was it. ;-D
I was working on another project on this computer where the log files were in the game's folder, BUT I completely  forgot that I only switched from AGS 3.3.x to AGS 3.4.x only last week on this computer. Zing!
Thanks a lot Gurok!!!

PS: thank you one more time, Windows Search, for not finding the f***ing files even if I check "search hidden and system folders and non-indexed locations and the entire universe". FOR GOD'S SAKE. :P :-\ :P
 

Crimson Wizard

There is an issue with manual, the information on file system is spread around over several topics instead of being gathered in one.

SMF spam blocked by CleanTalk