You are here

Forward commandline output to a file

10 posts / 0 new
Last post
vince@cmic.ca
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-22 12:59
Forward commandline output to a file

First off. What A WONDERFUL LITTLE program. Toucan is amazing.

Can someone please help with this:
I trying to forward the out of a backup job to a file but it never works.

This is what I have...

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>Toucan backup > log.txt

But the log file is always empty. The wierd thing is it still outputs as normal.

But if I do:

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>ipconfig > log.txt

This works perfectly fine.

Could someone PLEASE help me out?

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 58 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Quotes?

Maybe put "Toucan backup" in quotes. If that doesn't work, maybe Toucan just doesn't like job titles with spaces.

Sometimes, the impossible can become possible, if you're awesome!

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2005-12-10 15:22
As John

says quotes should do it,

toucan "Toucan backup" > log.txt

Ought to work fine.

J Neutron
Offline
Last seen: 7 months 1 week ago
Joined: 2008-06-10 19:26
Double?

If I recall correctly, using double greater-than signs will append to the file if it already exists:

toucan "Toucan backup" >> log.txt

That way it can really be a "log" file instead of just a report of the last run.

Jim

neutron1132 (at) usa (dot) com

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2005-12-10 15:22
I

never knew that, thanks Smile

vince@cmic.ca
Offline
Last seen: 15 years 10 months ago
Joined: 2009-01-22 12:59
Forward commandline output to a file

Thanks for the help but I don't think you understand.

This still doesn't work.

I am trying to run a "job".

If I type:

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>toucan job1 > log.txt

It does not forward the output.

BUT IF I TYPE:

C:\Documents and Settings\vince\Desktop\Toucan\App\toucan>ipconfig > log.txt

It works perfectly fine.

Please try it yourself, and please try to help me find a solution.

OR, even better please have an option in the "job" to save the job out status to a file.

THANKS!!!

christian.weiss
Offline
Last seen: 15 years 10 months ago
Joined: 2009-02-10 05:33
no output to the console

Hi vince,

toucan.exe is not sending output back to the console.

When you run toucan.exe you can see that a new window (application window / application console) will be opened. Output from that windows is not transfered back to the console.

This means that you can not get it with ">" or ">>".

Addressed to the developer:
I recomment to add a command line option („-log”) to “toucan.exe”.
By default the log file should be stored in the toucan program folder.
A second option to define a path where to store the log file would be nice.

desnoyerch01
Offline
Last seen: 15 years 8 months ago
Joined: 2009-03-08 22:10
Timing on obtaining the output

Also addressed to the developer:

Christian's identification of the root cause of the problem is correct.

One point that should be added to his suggestion of the log file is that control should not be returned to command line until the backup is completed. If control goes back to the command line prior to completion of the backup, the log will be incomplete.

The best scenario requires the following features when you are running in batch mode:
1) Availability of a log file showing the complete backup
2) An exit code (ERRORLEVEL) identifying the success or failure of the backup. Typically, this is 0 if an operation is successful, and 16 or greater if it is a failure. Intermediate values can identify specific situations, if there is a possibility that the user can recover automatically if the situation is known.

If you have both of these features, the entire operation can be easily automated.
The

cburkins
Offline
Last seen: 14 years 11 months ago
Joined: 2010-01-04 12:02
Command Line Output

Any progress on this feature ? Love the app, but would really like to be able to capture that output, or at least be able to control the log file name.

-Chad

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 2 months ago
Developer
Joined: 2005-12-10 15:22
Sure,

I actually just uploaded a new development test which adds this feature, see the manual for more info and any questions just ask Smile

Log in or register to post comments