Access console output

This topic has been viewed 10583 times and has 2 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
starrunner
Posts: 40
Joined: Wed Sep 15, 2010 10:44 am

Access console output

Post by starrunner »

Yesterday another user had problems loading my plugin:
https://sourceforge.net/p/sweethome3d/p ... /4/?page=1

I wanted to ask, is it possible for a normal user to see the console output of Sweet Home 3D?

I know that I can call Sweet Home 3D with the console executable of Java:

Code: Select all

"...path to my JRE..\bin\java.exe" ... com.eteks.sweethome3d.SweetHome3D
But there are two problems: the included JRE does not contain the "java.exe" and the additional arguments depend on the SH3D version and current environment.

So it would be nice, if we had a command line switch, something like:

Code: Select all

SweetHome3D.exe -log MyLogFile.log
Or the user could open the console output from inside of Sweet Home 3D.

As I always offer both for my standalone programs, I could provide a patch for that.

But I wanted to ask first for any objections.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Access console output

Post by Puybaret »

No need of a command line switch, simply use [font=courier new]2>pathToLog.txt[/font] command line Windows option to redirect console output to the desired file:

Code: Select all

"C:\Program Files\Sweet Home 3D\SweetHome3D.exe" 2>MyLogFile.log
Emmanuel Puybaret, Sweet Home 3D creator
starrunner
Posts: 40
Joined: Wed Sep 15, 2010 10:44 am

Re: Access console output

Post by starrunner »

Good to know, I didn't notice that output redirection even works for javaw.exe.

But [font=courier new]2>[/font] only redirects the error ouput, to redirect the whole output it has to be

Code: Select all

"C:\Program Files\Sweet Home 3D\SweetHome3D.exe" > MyLogFile.log 2>&1
Anyway, this will help me finding the problems of the error reports.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest