<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>1771</bug_id>
          
          <creation_ts>2011-11-17 13:40:08 +0000</creation_ts>
          <short_desc>Log bitbake console messages by default</short_desc>
          <delta_ts>2011-11-24 14:20:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Patches for this out for review on the mailing lists</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darren Hart">dvhart</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>17249</commentid>
    <comment_count>0</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-11-17 13:40:08 +0000</bug_when>
    <thetext>When issues arise, a log of the bitbake output is often helpful (not just the logs under the package temp directories). Users don&apos;t typically do this, and for hard to reproduce bugs, regenerating a log may not be doable.

I&apos;m using the following script, which I posted to the mailing list here:
https://lists.yoctoproject.org/pipermail/yocto/2011-November/005527.html
where it received some discussion. It seems this sort of thing may generally useful.

#!/bin/bash
TIMESTAMP=$(date -u &quot;+%Y%m%d%H%M%S&quot;)
LOG=$(mktemp --suffix=&quot;.log&quot; bb-$TIMESTAMP-XXX)
if [ -z &quot;$LOG&quot; ]; then
	echo &quot;ERROR: failed to create log file&quot;
	exit 1
fi

(
	echo &quot;Start: $TIMESTAMP&quot;
	echo &quot;========================================&quot;
	/usr/bin/time 2&gt;&amp;1 -v bitbake $@
	echo &quot;========================================&quot;
	echo &quot;End: $(date -u &apos;+%Y%m%d%H%M%S&apos;)&quot;
) | tee $LOG

echo &quot;Logfile: $LOG&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17250</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-17 14:48:23 +0000</bug_when>
    <thetext>I think given the log handling code we have in bitbake, we should just mirror the console output to a logfile somewhere in TMPDIR automatically...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17251</commentid>
    <comment_count>2</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-11-17 15:24:48 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I think given the log handling code we have in bitbake, we should just mirror
&gt; the console output to a logfile somewhere in TMPDIR automatically...

That sounds like a good approach to me as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17388</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-24 14:20:07 +0000</bug_when>
    <thetext>Fixed in master in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5f8b0ef64eea962b14da295f993c2cc436c37bea and http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2d8e5349a3dec405e005dc249d1412bad5a5977b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>