<p dir="ltr">If I remember correctly, this debug info goes to stderr while "normal" output goes to stdout, so a possible workaround would be to redirect stderr to stdout, e.g. by adding "2>&1" to the end of command line. <br>
Also note that this debug option won't work too well for parallel builds. </p>
<p dir="ltr">P.S. Give a look at Parts extension for SCons, their logger might do exactly what you need. Should be hosted at <a href="http://bitbucket.org/sconsparts">bitbucket.org/sconsparts</a> or something similar. </p>
<p dir="ltr">Thanks, <br>
Vasily</p>
<div class="gmail_quote">13 сент. 2016 г. 18:45 пользователь "Long Vu" <<a href="mailto:long.vu@intelerad.com">long.vu@intelerad.com</a>> написал:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Pierre !  This ts utility looks like what I need.<br>
<br>
I also gave the --debug=time a try, it is by far the easiest to<br>
implement.  So far it works great too but with possibly some weird<br>
buffering behavior.<br>
<br>
It seems that for built-in scons actions (ex: Delete, Mkdir) or<br>
commands that produce no stdout/stderr and is very fast (ex: ln,<br>
touch) , the "Command execution time" message seems to be buffered and<br>
I have a bunch of them stacked together so it is not exactly clear<br>
which "execution time" is for which command.<br>
<br>
However for slow commands (ex: the actually compilation) that produce<br>
output, then the immediately following "Command execution time" seems<br>
to be the matching one.  Although it can also be followed by a stack<br>
of other very short "Command execution time" from preceding quick<br>
actions.<br>
<br>
I think this could be a buffering problem.  Is there a way to turn off<br>
buffering?<br>
<br>
<br>
<br>
On Mon, Sep 12, 2016 at 3:44 PM, Pierre Tardy <<a href="mailto:tardyp@gmail.com">tardyp@gmail.com</a>> wrote:<br>
> Hello,<br>
> as per<br>
> <a href="http://unix.stackexchange.com/questions/26728/prepending-a-timestamp-to-each-line-of-output-from-a-command" rel="noreferrer" target="_blank">http://unix.stackexchange.com/<wbr>questions/26728/prepending-a-<wbr>timestamp-to-each-line-of-<wbr>output-from-a-command</a><br>
> you can use moreutils's ts to prepend timestamp to your commands:<br>
><br>
>   scons <whatever>| ts '[%Y-%m-%d %H:%M:%S]'<br>
><br>
> Le lun. 12 sept. 2016 à 21:36, Long Vu <<a href="mailto:long.vu@intelerad.com">long.vu@intelerad.com</a>> a écrit :<br>
>><br>
>> Thanks Vasily !  Not what we were looking for but could fill our needs.<br>
>><br>
>> I am still hoping someone could propose an option (ex: in<br>
>> BuildmasterConfig) that we could turn on for all builders so we can<br>
>> have timestamps for anything, not just scons build step.<br>
>><br>
>><br>
>> On Mon, Sep 12, 2016 at 2:06 PM, Vasily <<a href="mailto:just.one.man@yandex.ru">just.one.man@yandex.ru</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > Just try --debug=time SCons option ;-)<br>
>> ><br>
>> > Thanks,<br>
>> > Vasily<br>
>> ><br>
>> > 12 сент. 2016 г. 20:01 пользователь "Long Vu" <<a href="mailto:long.vu@intelerad.com">long.vu@intelerad.com</a>><br>
>> > написал:<br>
>> >><br>
>> >> Hi,<br>
>> >><br>
>> >> Our buildbot calls scons which then calls the various commands that<br>
>> >> made up the build.<br>
>> >><br>
>> >> We want to diagnose slow builds, specifically which of the commands is<br>
>> >> hogging build time.<br>
>> >><br>
>> >> So is there a quick way to prefix timestamp on each log line collected<br>
>> >> by buildbot?<br>
>> >><br>
>> >> The alternative would be to modify all the scons build file in all the<br>
>> >> source repository to prefix the timestamp, but that would means a lot<br>
>> >> of commits.<br>
>> >><br>
>> >> We would prefer a centralized solution in buildbot that will also<br>
>> >> future proof all the new source repositories that we will add later.<br>
>> >><br>
>> >> Thanks,<br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743<br>
>> >><br>
>> >> --<br>
>> >><br>
>> >> This email or any attachments may contain confidential or legally<br>
>> >> privileged information intended for the sole use of the addressees. Any<br>
>> >> use, redistribution, disclosure, or reproduction of this information,<br>
>> >> except as intended, is prohibited. If you received this email in error,<br>
>> >> please notify the sender and remove all copies of the message,<br>
>> >> including<br>
>> >> any attachments.<br>
>> >><br>
>> >> ______________________________<wbr>_________________<br>
>> >> users mailing list<br>
>> >> <a href="mailto:users@buildbot.net">users@buildbot.net</a><br>
>> >> <a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/<wbr>mailman/listinfo/users</a><br>
>> >><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743<br>
>><br>
>> --<br>
>><br>
>> This email or any attachments may contain confidential or legally<br>
>> privileged information intended for the sole use of the addressees. Any<br>
>> use, redistribution, disclosure, or reproduction of this information,<br>
>> except as intended, is prohibited. If you received this email in error,<br>
>> please notify the sender and remove all copies of the message, including<br>
>> any attachments.<br>
>><br>
>> ______________________________<wbr>_________________<br>
>> users mailing list<br>
>> <a href="mailto:users@buildbot.net">users@buildbot.net</a><br>
>> <a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/<wbr>mailman/listinfo/users</a><br>
<br>
<br>
<br>
--<br>
Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743<br>
<br>
--<br>
<br>
This email or any attachments may contain confidential or legally<br>
privileged information intended for the sole use of the addressees. Any<br>
use, redistribution, disclosure, or reproduction of this information,<br>
except as intended, is prohibited. If you received this email in error,<br>
please notify the sender and remove all copies of the message, including<br>
any attachments.<br>
<br>
<br>
</blockquote></div>