Is there a possibility to create log files in gui mode like it is done in batch mode?

Discuss new features and functions
Posts: 26
Joined: 19 Oct 2009

echtatze

Is or will there be a possibility to configure ffs to create log files in gui mode in the same way as it is done in the batch mode?
For example with a "LogfileFolder" tag in the "*.ffs_gui" file?
I like to use the gui mode to 'see whats going on', but I would feel much better, if 'per sync' log files would be created automatically too, for history purposes.

I guess that wouln't be so much effort to implement, or?

And additionally I see no reason for not implementing it, because it would be configureable.

Would be very pleased if you implement it.

Thanks in advance.
Posts: 18
Joined: 7 Dec 2001

greydawn

+1
Posts: 73
Joined: 13 Nov 2003

wm-sf

I think the trick is to use the gui mode to open a batch script (i.e. the script has the log settings).

I use this often and it works here
Posts: 26
Joined: 19 Oct 2009

echtatze

I tried it now with Version 7.1 here in two different ways:
- I started FreeFileSync.exe by hand, opened the ffs_batch file and executed the sync.
- I started FreeFileSync.exe by providing "-edit" and the ffs_batch file by command line and executed the sync by hand.

None approach created the log file.

Calling FreeFileSync.exe and providing only the ffs_batch file automatically executes the sync and also creates the log file.


So, sorry, I can't confirm your way.
Posts: 26
Joined: 19 Oct 2009

echtatze

One more Argument from my side for implementing the logging (create log files) in gui mode:
In my synchronizations there often are some conflicts.
The reason is that I have some portable programs in the synchronized folders.

Those conflicts are not bad, but I would have to solve them.

So currently I'm running in Batch mde, which provides me the log files, but I've no chance to solve the conflicts.

So I have to run FFS additionally in gui mode after the batch mode.

Hope you understand my needs.
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

One more Argument from my side for implementing the logging (create log files) in gui mode:
In my synchronizations there often are some conflicts.
The reason is that I have some portable programs in the synchronized folders.

Those conflicts are not bad, but I would have to solve them.

So currently I'm running in Batch mde, which provides me the log files, but I've no chance to solve the conflicts.

So I have to run FFS additionally in gui mode after the batch mode.

Hope you understand my needs.echtatze
When conflicts are found in batch mode, FFS will show a popup allowing to "Switch" to GUI mode directly. (unless popups are "ignored")
Posts: 26
Joined: 19 Oct 2009

echtatze

That would be nice, but unfortunately I can't see such a possibility to switch to GUI.
I'm using version 7.1 of FFS and call it like this:
FreeFileSync.exe myjob.ffs_batch
In the configuration I don't supress the popups.
Please see the attached screenshots.

Hopefully I didn't misunderstand anything.
Attachments
configuration.png
configuration.png (45.13 KiB) Viewed 2387 times
completed.png
completed.png (37.34 KiB) Viewed 2387 times
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

That would be nice, but unfortunately I can't see such a possibility to switch to GUI.
I'm using version 7.1 of FFS and call it like this:
FreeFileSync.exe myjob.ffs_batch
In the configuration I don't supress the popups.
Please see the attached screenshots.

Hopefully I didn't misunderstand anything.echtatze
What are your settings in the "save as ffs_batch" dialog?
Posts: 26
Joined: 19 Oct 2009

echtatze

In the ".ffs_batch" file I couldn't find anything regarding 'saving', so I loaded it by hand and called "save as ffs_batch", took care that "pop-up" is selected and saved it with a different file name.
After textually comparing those two ".ffs_batch" files (with Total Commander) there was no difference between them.

So the parameters you asked for look like the dialog in the attachment.
Attachments
SaveAsBatchJob.png
SaveAsBatchJob.png (14.69 KiB) Viewed 2387 times
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

In the ".ffs_batch" file I couldn't find anything regarding 'saving', so I loaded it by hand and called "save as ffs_batch", took care that "pop-up" is selected and saved it with a different file name.
After textually comparing those two ".ffs_batch" files (with Total Commander) there was no difference between them.

So the parameters you asked for look like the dialog in the attachment.echtatze
The configuration so far looks correct. There is probably only a single reason left why the warning dialog is not shown in batch: you have selected the "don't show this dialog again" checkbox. This setting is saved in globalsettings.xml, but all warnings can also be restored via menu -> tools -> options.
Posts: 26
Joined: 19 Oct 2009

echtatze

You are right, I took a look and saw that "WarnUnresolvedConflicts" is set to "false".
So I set it to "true" and finally there is the mentioned dialog!

So far so good.

But when I now press the "Switch" button in this dialog, the gui starts up and then there also is no logging to file any more. :-(

Any idea?
Maybe better implement logging in gui mode yet?
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

You are right, I took a look and saw that "WarnUnresolvedConflicts" is set to "false".
So I set it to "true" and finally there is the mentioned dialog!

So far so good.

But when I now press the "Switch" button in this dialog, the gui starts up and then there also is no logging to file any more. :-(

Any idea?
Maybe better implement logging in gui mode yet?echtatze
The idea for GUI mode is that since the user is handling synchronization manually, he will also acknowledge the results dialog showing a (non-persistent) log. In addition there is %appdata%\FreeFileSync\LastSyncs.log.
Posts: 26
Joined: 19 Oct 2009

echtatze

In understand that, but please tell me, is it realy that hard to implement?
There is no backdraw as far as I see?

But I will respect your decision not to implement the requested feature.

However, thanks for investigation. :-)
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

One major drawback would be that additional options would have to be added to the GUI that probably 99% of users wouldn't need in their scenario.

In general I don't like the current hybrid solution of having both an %appdata%\LastSyncs.log (truncated in size, available for all scenarios) and a log file directory (limited by number of files, available for batch only) too much.
Maybe there is a better, simpler, more harmonized solution. Also, maybe a link to "LastSyncs.log" should be shown somewhere on the results dialog.
Posts: 26
Joined: 19 Oct 2009

echtatze

Finally I found a solution by enhancing my Batch:

REM Prepare datetime variables:
FOR /F "tokens=1,2,3,4,5 delims=/. " %%a IN ('date/T') DO SET CDATE=%%c%%b%%a
FOR /F "tokens=1-4 delims=/:,. " %%a IN ("%time%") DO SET CTIME=%%a%%b%%c

REM Run the job
FreeFileSync\FreeFileSync.exe FreeFileSync\Jobs\Job.ffs_gui

REM Move LastSyncs.log to archive.
@MOVE FreeFileSync\LastSyncs.log FreeFileSync\Jobs\Job-LastSyncs-%CDATE%-%CTIME%.log


Additionally I set "LastSyncsLogSizeMax" of the "GlobalSettings.xml" to "10485760" (10MB), just to be sure it's not truncated.