Hi, I would like to log whatever happens with rsync on client side when it runs with Cygwin on NT4. First, I just did a redirect of the screen output to a log-file: rsync -rtv --delete --modify-window=2 --stats /cygdrive/g/users/bco/test/ bee2bs01::d/test/ >>c:\rsync\log\%FDATE%.log The problem with this method is that it does not redirect whatever Rsync reports as errors; because they are showed on the screen. This is a shame, because that's the info that interests us. I've fiddled around quite a bit with the "--log-format=" option, but I don't get any valid output, perhaps because NT uses another escape character than Unix/Linux. Anyone any ideas to still be able to capture all error messages into a logfile? Thx already! MVG, Bart Coninckx Network Administrator CNE, ASE ************************************* Watco ICT Services Lilsedijk 19 B-2340 Beerse Belgium e-mail: bart.coninckx@watco.be Tel: + 32 (0) 14 60 99 42 Fax: + 32 (0) 14 62 41 47 *************************************
On Fri, Sep 13, 2002 at 12:15:59PM +0200, bart.coninckx@watco.be wrote:> Hi, > > I would like to log whatever happens with rsync on client side when it runs > with Cygwin on NT4. > First, I just did a redirect of the screen output to a log-file: > > rsync -rtv --delete --modify-window=2 --stats /cygdrive/g/users/bco/test/ > bee2bs01::d/test/ >>c:\rsync\log\%FDATE%.log > > > The problem with this method is that it does not redirect whatever Rsync > reports as errors; because they are showed on the screen. This is a shame, > because that's the info that interests us. > > I've fiddled around quite a bit with the "--log-format=" option, but I > don't get any valid output, perhaps because NT uses another escape > character than Unix/Linux. > > > Anyone any ideas to still be able to capture all error messages into a > logfile? >The verbosity is sent to STDOUT (file descriptor 1), Errors go to STDERR (file descriptor 2). The shell is responsible for redirection, not rsync. I'm guessing that you are running bash. Look at the section entitled 'REDIRECTION' in the bash manpage. It does better job than i could here. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
Actually, we're not running bash, I just have rsync.exe and the necessary Cygwin dll's in one folder and run everything in CMD.EXE. I will however look into CMD.EXE's capabilities of redirecting everything to a file, but I'll probably (once again) will run into the limits of using Win32, because I don't think it has STDOUT and STDERR as in Unix. Thank you! Bart Coninckx Network Administrator CNE, ASE ************************************* Watco ICT Services Lilsedijk 19 B-2340 Beerse Belgium e-mail: bart.coninckx@watco.be Tel: + 32 (0) 14 60 99 42 Fax: + 32 (0) 14 62 41 47 ************************************* jw schultz <jw@pegasys.ws To: bart.coninckx@watco.be > cc: rsync@lists.samba.org Subject: Re: logging on client side on NT 13/09/2002 12:46 On Fri, Sep 13, 2002 at 12:15:59PM +0200, bart.coninckx@watco.be wrote:> Hi, > > I would like to log whatever happens with rsync on client side when itruns> with Cygwin on NT4. > First, I just did a redirect of the screen output to a log-file: > > rsync -rtv --delete --modify-window=2 --stats /cygdrive/g/users/bco/test/ > bee2bs01::d/test/ >>c:\rsync\log\%FDATE%.log > > > The problem with this method is that it does not redirect whatever Rsync > reports as errors; because they are showed on the screen. This is ashame,> because that's the info that interests us. > > I've fiddled around quite a bit with the "--log-format=" option, but I > don't get any valid output, perhaps because NT uses another escape > character than Unix/Linux. > > > Anyone any ideas to still be able to capture all error messages into a > logfile? >The verbosity is sent to STDOUT (file descriptor 1), Errors go to STDERR (file descriptor 2). The shell is responsible for redirection, not rsync. I'm guessing that you are running bash. Look at the section entitled 'REDIRECTION' in the bash manpage. It does better job than i could here. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
I just did actually: you have to do a redirecton to two different files, like this: rsync -rtv --delete --modify-window=2 --stats /cygdrive/g/users/bco/test/ bee2bs01::d/test/ >>c:\rsync\log\file1.log 2>>c:\rsync\log\file2.log the second redirection "2>>" redirects all errors info two a second file. The "2" is for redirectnig STDERR. You can't use the same file, because you get a "already in use" error. Rgds, Bart Coninckx Network Administrator CNE, ASE ************************************* Watco ICT Services Lilsedijk 19 B-2340 Beerse Belgium e-mail: bart.coninckx@watco.be Tel: + 32 (0) 14 60 99 42 Fax: + 32 (0) 14 62 41 47 ************************************* Jos? Luis Barrera <jluis.barrera@olec To: <bart.coninckx@watco.be> enter.com> cc: Subject: RE: logging on client side on NT 13/09/2002 13:00 Please respond to jluis.barrera I have problems with rsync in NT too, actually is w2k, and i didnt get the solution... Jos? Luis Barrera Developer/Xpert OnLine [www.xperttesting.com] jluis.barrera@olecenter.com [www.Olecenter.com] Alcobendas/Madrid "By the perception of illusion, we experience reality" "Every picture holds a tale, every shade tells of a thousand words" -----Original Message----- From: rsync-admin@lists.samba.org [mailto:rsync-admin@lists.samba.org]On Behalf Of bart.coninckx@watco.be Sent: viernes, 13 de septiembre de 2002 12:55 To: jw schultz Cc: rsync@lists.samba.org Subject: Re: logging on client side on NT Actually, we're not running bash, I just have rsync.exe and the necessary Cygwin dll's in one folder and run everything in CMD.EXE. I will however look into CMD.EXE's capabilities of redirecting everything to a file, but I'll probably (once again) will run into the limits of using Win32, because I don't think it has STDOUT and STDERR as in Unix. Thank you! Bart Coninckx Network Administrator CNE, ASE ************************************* Watco ICT Services Lilsedijk 19 B-2340 Beerse Belgium e-mail: bart.coninckx@watco.be Tel: + 32 (0) 14 60 99 42 Fax: + 32 (0) 14 62 41 47 ************************************* jw schultz <jw@pegasys.ws To: bart.coninckx@watco.be > cc: rsync@lists.samba.org Subject: Re: logging on client side on NT 13/09/2002 12:46 On Fri, Sep 13, 2002 at 12:15:59PM +0200, bart.coninckx@watco.be wrote:> Hi, > > I would like to log whatever happens with rsync on client side when itruns> with Cygwin on NT4. > First, I just did a redirect of the screen output to a log-file: > > rsync -rtv --delete --modify-window=2 --stats /cygdrive/g/users/bco/test/ > bee2bs01::d/test/ >>c:\rsync\log\%FDATE%.log > > > The problem with this method is that it does not redirect whatever Rsync > reports as errors; because they are showed on the screen. This is ashame,> because that's the info that interests us. > > I've fiddled around quite a bit with the "--log-format=" option, but I > don't get any valid output, perhaps because NT uses another escape > character than Unix/Linux. > > > Anyone any ideas to still be able to capture all error messages into a > logfile? >The verbosity is sent to STDOUT (file descriptor 1), Errors go to STDERR (file descriptor 2). The shell is responsible for redirection, not rsync. I'm guessing that you are running bash. Look at the section entitled 'REDIRECTION' in the bash manpage. It does better job than i could here. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
use the real shell, and instead of the dual redirections, use:>>logfile 2>&1, which will open the logfile as STDOUT, and redirect STDERR to the STDOUT filehandle. Tim Conway tim.conway@philips.com 303.682.4917 office, 303.921.0301 cell Philips Semiconductor - Longmont TC 1880 Industrial Circle, Suite D Longmont, CO 80501 Available via SameTime Connect within Philips, caesupport2 on AIM "There are some who call me.... Tim?"