Python Logging Question

Hey everyone,

I have been using a logfile system based on a post by Monster (here) I have since updated to 2.58, and made what I believed were the necessary changes to keep it functional. However, it doesn’t seem to be working; there are no errors, but the actual log file is never saved to the computer.

The scripts of interest are,, and quit,py. These are setup with the appropriate logic blocks using the camera.

You will notice some things I have printing out to the console to assist in debugging – and these are printing as expected.

Can anyone help me figure out why this is not saving the log to the disk? Feel free to ask any questions – I am happy to provide additional details.

I was unable to attach the .blend file (error said “Upload of the file failed…”), so here is a link to it from my dropbox account:

Sorry cant check the file right now. but if nothing works out try this command on cmd prompt.

blenderplayer.exe blend_file.blend > log.txt

Ahhh this old logging file. Now I would do it a bit different, but it is still fine.

Nice to see that someone uses it :).

I just started your demo file. The first thing it says is it can’t find bge in “”.

You need to import that and it starts logging.
The output format looks a bit different.

I hope it helps

The actual .blend file I am using imported the .bge, but the version I uploaded did not (I trimmed down the script to make it much easier to follow, and for some reason removed that portion.) However, in my actual .blend file, it turns out that was out of scope. In addition, it was dropping the .txt file in a different directory that I expected; I expected it to drop in the same directory as the .blend file, but it dropped it at the root of C:. I want to say that is how it used to work in 2.49, but I am not sure… and it works now. Turns out it was working all along :o

Thank you both for the responses!