writing repozo messaging output to a file....
Would anyone know how to modify the repozo command to log output messages to a file? I realise that the 'v' flat displays messaging, however we're using a tool (VisualCron) which runs a series of commands and we are unable to view python output when this tool executes python commands... repozo -BvzQ -r /foo/backup -f /foo/Data.fs michael
On Tuesday 03 February 2009, michael nt milne wrote:
repozo -BvzQ -r /foo/backup -f /foo/Data.fs
repozo -BvzQ -r /foo/backup -f /foo/Data.fs > output.txt Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter"
Hi Stephan Thanks for this. I added the output file bit, "> output1.txt" , didn't know where to create the file, so I created it in all 3 possible places on our LIVE server where the task runs - D:\Program Files\Enfold Server\Zope\utilities\ZODBTools - Data/Backup/Hot-Back-Ups - Server/var/Data.fs Ran the task and nothing was written to any of the files....? michael On Tue, Feb 3, 2009 at 10:59 PM, Stephan Richter < srichter@cosmos.phy.tufts.edu> wrote:
On Tuesday 03 February 2009, michael nt milne wrote:
repozo -BvzQ -r /foo/backup -f /foo/Data.fs
repozo -BvzQ -r /foo/backup -f /foo/Data.fs > output.txt
Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter"
On Thursday 05 February 2009, michael nt milne wrote:
Ran the task and nothing was written to any of the files....?
Just specify an absolute path then. You do not have to create the file; it is created for you. Mmh, maybe the output is written stderr, in which case this would not work, but I am pretty sure that unix shell has an answer for that too; just read up on it. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter"
Le jeudi 05 février 2009 à 07:45 -0800, Stephan Richter a écrit :
On Thursday 05 February 2009, michael nt milne wrote:
Ran the task and nothing was written to any of the files....?
Just specify an absolute path then. You do not have to create the file; it is created for you. Mmh, maybe the output is written stderr, in which case this would not work, but I am pretty sure that unix shell has an answer for that too; just read up on it.
If messages are written to stderr instead of stdout, then you should do : repozo.py [your params] > /var/log/repozo.log 2>&1 to have all outputs into specified file. If you only want to log errors, then : repozo.py [your params] 2> /var/log/repozo.log With hope this helps, Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : thierry.florac@onf.fr Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85
Hi / Thanks for this. We're on Windows so unix commands won't work... On 2/5/09, Thierry Florac <thierry.florac@onf.fr> wrote:
Le jeudi 05 février 2009 à 07:45 -0800, Stephan Richter a écrit :
On Thursday 05 February 2009, michael nt milne wrote:
Ran the task and nothing was written to any of the files....?
Just specify an absolute path then. You do not have to create the file; it is created for you. Mmh, maybe the output is written stderr, in which case this would not work, but I am pretty sure that unix shell has an answer for that too; just read up on it.
If messages are written to stderr instead of stdout, then you should do :
repozo.py [your params] > /var/log/repozo.log 2>&1
to have all outputs into specified file.
If you only want to log errors, then :
repozo.py [your params] 2> /var/log/repozo.log
With hope this helps,
Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : thierry.florac@onf.fr Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- michael
Actuall, std-- redirection does.. mostly. C:>echo "this is a test " > test.txt C:>type test.txt "this is a test " C:\>echo "testing 2 " >> test.txt 2>&1 C:\>type test.txt "this is a test " "testing 2 " On Thu, Feb 5, 2009 at 12:00 PM, <michael.milne@gmail.com> wrote:
Hi / Thanks for this. We're on Windows so unix commands won't work...
On 2/5/09, Thierry Florac <thierry.florac@onf.fr> wrote:
Le jeudi 05 février 2009 à 07:45 -0800, Stephan Richter a écrit :
On Thursday 05 February 2009, michael nt milne wrote:
Ran the task and nothing was written to any of the files....?
Just specify an absolute path then. You do not have to create the file; it is created for you. Mmh, maybe the output is written stderr, in which case this would not work, but I am pretty sure that unix shell has an answer for that too; just read up on it.
If messages are written to stderr instead of stdout, then you should do :
repozo.py [your params] > /var/log/repozo.log 2>&1
to have all outputs into specified file.
If you only want to log errors, then :
repozo.py [your params] 2> /var/log/repozo.log
With hope this helps,
Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : thierry.florac@onf.fr Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- michael _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- David Bear College of Public Programs at ASU 602-464-0424
participants (5)
-
David Bear -
michael nt milne -
michael.milne@gmail.com -
Stephan Richter -
Thierry Florac