Standard output logging

Would it be difficult to add a --stdout=<path> logging parameter to Duplicati.CommandLine.exe which would either fork or send normal console / GUI output to the specified <path>? (Note that this is different from the existing --log-file parameter which is to “log internal information”.)

I’m picturing this being used with GUI run Compare or Test-Filter commands - or even Backup commands which could be used to help debug something like this backup (which was run with --full-results):

Backup started at 14-Nov-17 12:00:13 PM
Checking remote backup ...
  Listing remote folder ...
scheduling missing file for deletion, currently listed as Uploading: duplicati-20171109T201907Z.dlist.zip
promoting uploaded complete file from Uploading to Uploaded: duplicati-b1868b6c1a63940debb0e4fe3e0ee9deb.dblock.zip
scheduling missing file for deletion, currently listed as Uploading: duplicati-i1cd603e939b6487c95daf5c675156755.dindex.zip
Expected there to be a temporary fileset for synthetic filelist (5, duplicati-b33d9ab921dda40e7bd2a7344622683fc.dblock.zip), but none was found?
Re-creating missing index file for duplicati-b1868b6c1a63940debb0e4fe3e0ee9deb.dblock.zip
Scanning local files ...
  Uploading file (35.81 KB) ...
  544 files need to be examined (116.12 MB)
  8 files need to be examined (71.78 MB)
  7 files need to be examined (66.78 MB)
  6 files need to be examined (34.21 MB)
Failed to process path: J:\\Duplicati\data\control_dir_v2\lock_v2 => The process cannot access the file 'J:\Duplicati\data\control_dir_v2\lock_v2' because it is being used by another process.
  0 files need to be examined (0 bytes)
  Uploading file (659.61 KB) ...
Operation Put with file duplicati-b8f8095b8f94b480b885462ec97c9705c.dblock.zip attempt 1 of 5 failed with message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. => The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Renaming "duplicati-b8f8095b8f94b480b885462ec97c9705c.dblock.zip" to "duplicati-bd74b81d998c44a00bce555ed58d94775.dblock.zip"
  Uploading file (659.61 KB) ...
Operation Put with file duplicati-bd74b81d998c44a00bce555ed58d94775.dblock.zip attempt 2 of 5 failed with message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. => The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Renaming "duplicati-bd74b81d998c44a00bce555ed58d94775.dblock.zip" to "duplicati-b1967bbc67b6f4eca8a01c4ebaab2ed02.dblock.zip"
  Uploading file (659.61 KB) ...
Operation Put with file duplicati-b1967bbc67b6f4eca8a01c4ebaab2ed02.dblock.zip attempt 3 of 5 failed with message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. => The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Renaming "duplicati-b1967bbc67b6f4eca8a01c4ebaab2ed02.dblock.zip" to "duplicati-b74f5e28ae64b49f890308bb30b14558f.dblock.zip"
  Uploading file (659.61 KB) ...
Operation Put with file duplicati-b74f5e28ae64b49f890308bb30b14558f.dblock.zip attempt 4 of 5 failed with message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. => The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Renaming "duplicati-b74f5e28ae64b49f890308bb30b14558f.dblock.zip" to "duplicati-b534c0f6c7d824357a4bff8ebff15b4c1.dblock.zip"
  Uploading file (659.61 KB) ...
Operation Put with file duplicati-b534c0f6c7d824357a4bff8ebff15b4c1.dblock.zip attempt 5 of 5 failed with message: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. => The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Fatal error => The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at Duplicati.Library.Main.BackendManager.WaitForComplete(LocalDatabase db, IDbTransaction transation)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)
   at Duplicati.Library.Main.Controller.<>c__DisplayClass16_0.<Backup>b__0(BackupResults result)
   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
   at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter)
   at Duplicati.CommandLine.Commands.Backup(TextWriter outwriter, Action`1 setup, List`1 args, Dictionary`2 options, IFilter filter)
   at Duplicati.CommandLine.Program.RunCommandLine(TextWriter outwriter, TextWriter errwriter, Action`1 setup, String[] args)
Return code: 100
1 Like

Would this option do something else than just piping?

For example:

Duplicati.CommandLine.exe backup file://xyz c:\data > logfile.txt

In general I would expect that to do exactly what I’m wanting (at least on Windows).