7

Is it possible to launch Blender in a mode where everything that appears in the Blender Console is sent to a file?

CodeManX
  • 29,298
  • 3
  • 89
  • 128
Jeepster
  • 135
  • 1
  • 6
  • 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 Answers2

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
6

On Windows,

  1. Open a command prompt (Windows KeyR, type cmd and hit Enter)
  2. Drag the Blender shortcut or exe onto the prompt
    C:\Users\Yourname>C:\Path\to\Blender.exe
  3. Add > %homepath%\Desktop\blender.log
  4. Hit return to start Blender with all console output redirected to blender.log on 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