Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B2508E008A1 for ; Wed, 26 Feb 2014 05:52:37 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 26 Feb 2014 05:48:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,548,1389772800"; d="scan'208";a="462589875" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga001.jf.intel.com with ESMTP; 26 Feb 2014 05:52:15 -0800 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.96]) by IRSMSX104.ger.corp.intel.com ([169.254.5.244]) with mapi id 14.03.0123.003; Wed, 26 Feb 2014 13:52:14 +0000 From: "Barros Pena, Belen" To: Amit Kumar Chaudhary , "toaster@yoctoproject.org" Thread-Topic: [Toaster] Errors and Warnings listing on the dashboard page. Thread-Index: AQHPMuw29ASIXD3RN0iMvAxCydL7tZrHjg6A Date: Wed, 26 Feb 2014 13:52:14 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.9.131030 x-originating-ip: [10.237.224.31] MIME-Version: 1.0 Subject: Re: Errors and Warnings listing on the dashboard page. X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Feb 2014 13:52:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-ID: <431AD609CB49AF44A8AE41B0B399C9BD@intel.com> Content-Transfer-Encoding: quoted-printable On 26/02/2014 12:13, "Amit Kumar Chaudhary" wrote: > >Hello,=20 > > >This is the patch I had been working on, It is complete now and works as >expected (as the prototype page), can you please review? > > >http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=3Dachaudh= ar >y/errors_warning_on_builddashboard&id=3D1aaada41ec2129bd9bc31cc591b75f6d9b= cb >7251 Hi Amit, From an interface standpoint, this is looking pretty good. I am however seeing some mismatch between the number of warnings and the number of messages shown in the warnings section. It looks like the number of warnings is displaying the overall number of entries in the orm_logmessage table.=20 The number of warnings should be the number of entries in the orm_logmessage table with level =3D 1. The number of errors should be the number of entries with level =3D 2. Any chance you could verify is this what's is being shown in the interface? Thanks! Bel=E9n > > >Thanks! > > >--=20 >Amit Kumar Chaudhary > > > >On 24 February 2014 at 8:46:21 pm, Amit Kumar Chaudhary >(amit@floatingpondtech.com ) wrote: > >Thanks Alex, > > >"The LogMessage table is designed to hold logs coming from the build >process itself=B2 > > >This is the part I was trying to figure out. I have got the handle on how >to retrieve the messages from the table, (how those were put in there in >the first place is still a mystery), > I have added the following code to 'builddashboard(request, build_id)=B9 >function defined in toastergui/views.py > > > context =3D { > 'build' : Build.objects.filter(pk=3Dbuild_id)[0], >- 'recipecount' : >Recipe.objects.filter(layer_version__id__in=3DLayer_Version.objects.filter= (b >uild=3Dbuild_id)).count() >+ 'recipecount' : >Recipe.objects.filter(layer_version__id__in=3DLayer_Version.objects.filter= (b >uild=3Dbuild_id)).count(), >+ 'logmessages': LogMessage.objects.filter(build=3Dbuild_id), > } > return render(request, template, context) > > >now I can use the logmessages in >toastergui/templates/builddashboard.html, using the html code I was >trying to re-use below. I have a patch that nearly works, I will clean >that up a bit and post it for giving a better picture. > > >Thanks for all the insights. > > >--=20 >Amit Kumar Chaudhary > > > >On 20 February 2014 at 8:34:36 pm, Damian, Alexandru >(alexandru.damian@intel.com ) wrote: > >Hello, > > >The LogMessage table is designed to hold logs coming from the build >process itself, and not logs that result from normal task execution. >It is the difference between the output displayed from the bitbake >command, and the output from the "make" command in a "do_compile" task. > > >For the latter case, we currently do not hold/save the content of such >log files. We do not have yet a strategy on determining what log files >are important, and saving everything may be > a prohibitive cost in terms of storage. > > >Hope this helps, >Alex > > > >On Thu, Feb 20, 2014 at 11:18 AM, Amit Kumar Chaudhary > wrote: > >Hello,=20 > > >I am just beginning with the toaster and web apps in general, and I am >trying to add errors and warning listing to the build dashboard page, as >prototyped at > > >https://www.yoctoproject.org/toaster/build-dashboard-failed.html#errors > > >I am trying to re-use the following code -- > > > >{{build.errors_no}}:{% if build.errors_no %}{% for error in logs >%}{% if error.build =3D=3D build %}{% if error.level =3D=3D 2 >%}

{{error.message}}

{% endif %}{% endif %}{% endfor %}{% else >%}None{% endif %} > > >from=20 >~/poky-contrib/bitbake/lib/toaster/bldviewer/templates/simple_build.html. > > >And, I am expecting the logs, for example at >~/poky-contrib/build/tmp/log/cooker/qemux86/20140213120738.log > > >to be read via LogMessage class below > > >class LogMessage(models.Model): > INFO =3D 0 > WARNING =3D 1 > ERROR =3D 2 > > > LOG_LEVEL =3D ( (INFO, "info"), > (WARNING, "warn"), > (ERROR, "error") ) > > > build =3D models.ForeignKey(Build) > level =3D models.IntegerField(choices=3DLOG_LEVEL, default=3DINFO) >=8B> message=3Dmodels.CharField(max_length=3D240) > pathname =3D models.FilePathField(max_length=3D255, blank=3DTrue) > lineno =3D models.IntegerField(null=3DTrue) > > >implemented in ~/poky-contrib/bitbake/lib/toaster/orm/models.py. > > >But, I can=B9t seem to find the code that does it, reading from the log >file to the sqlite table. Could someone please point me to the files/path >that might contain this code, or such code for other tables. > > >Thanks! > > > >--=20 >Amit Kumar Chaudhary > > > > >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster > > > > > > > > >-- >Alex Damian >Yocto Project > >SSG / OTC=20 > > > > > > >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster > > > >