Is it possible to launch Blender in a mode where everything that appears in the Blender Console is sent to a file?
Asked
Active
Viewed 6,504 times
7
-
That's OK, mods can add the tags that are necessary to your question later. Creating new tags is generally not a good idea, because it makes organization more difficult. – CharlesL Feb 10 '14 at 18:41
2 Answers
9
On Linux/Ubuntu its ./blender > myLog123.txt from the working directory.
./blender &> myLog123.txt to include Stderr.
In Python you can do
import sys
file = open(filepath, "w")
sys.stdout = file
#...
#...
sys.stdout = sys.__stdout__ #reset
file.close()
to catch the console output while your script is running.
pink vertex
- 9,896
- 1
- 25
- 44
-
3Changing sys.stdout in Python apparently catches most of the console output, but not everything. – Garrett Feb 10 '14 at 20:23
-
Oh that's a very cool / useful approach... will definitively try that! – Jeepster Feb 10 '14 at 20:54
6
On Windows,
- Open a command prompt (Windows KeyR, type
cmdand hit Enter) - Drag the Blender shortcut or exe onto the prompt
C:\Users\Yourname>C:\Path\to\Blender.exe - Add
> %homepath%\Desktop\blender.log - Hit return to start Blender with all console output redirected to
blender.logon your Desktop.
For Mac and Linux, have a look here:
http://www.blender.org/manual/getting_started/basics/interface/window_system/console_window.html
ideasman42
- 47,387
- 10
- 141
- 223
CodeManX
- 29,298
- 3
- 89
- 128