It's all about the answers!

Ask a question

RTC SCM Git: Are there ways to customise python scripts in post-receive git hooks (eg AssociateWorkitem.py) to output debug information to file?


George Harada (3218) | asked Aug 22 '16, 2:48 a.m.
There are python files that is developed as part of IBM RTC git integration, (eg AssociateWorkitem.py and ValidatePush.py) that are run as post receive git hooks.

Are there ways to customise these files in order to print debugging messages to file? (messages such as whether the scripts are correctly run etc)

We tried adding:
export DEBUG_PYT=true
to post-receive, though that would display the information on the command line, and doesn't allow for it to be outputted to file.

2 answers



permanent link
George Harada (3218) | answered Dec 26 '16, 1:18 a.m.
Created RFE since it is not possible:
http://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=93368

permanent link
HIROAKI JOSAKO (45221) | answered Dec 26 '16, 2:19 a.m.

Thanks George!

We were able to output logs using Python's standard output function.
It is described in "Association WorkItems.py".

After this
We are planning to create a mechanism to insert log processing and debug.


Comments
George Harada commented Dec 26 '16, 9:36 p.m.

Josako-san,
It is great that you got the output function working. It should just be a matter of processing that information, which you seem to already be doing.

Your answer


Register or to post your answer.