[Buildbot-devel] [Buildbot]how to attach Only few nos of lines in attached logfile
tom fogal
tfogal at alumni.unh.edu
Wed Apr 14 14:36:39 UTC 2010
Ravindra Parihar <imravin at gmail.com> writes:
> def getCustomMesgData(self, mode, name, build, results, master_status):
[snip]
> On Wed, Apr 14, 2010 at 6:52 PM, Ravindra Parihar <imravin at gmail.com> wrote:
> > I am not aware of python :( so not getting where to use
> > "'\n'.join(loglines[-10:])" exactly.
> > I tried to use it in buildbot/status/mail.py script at 291 line but
> > it not showing any difference to the output.
> >
> > May be I am not using it correctly.
There is a detailed solution to this problem in the documentation.
See:
http://djmitche.github.com/buildbot/docs/0.8.0beta1/MailNotifier.html#MailNotifier
in particular, look at the "message_formatter" function it defines.
-tom
> > On Wed, Apr 14, 2010 at 2:35 PM, Marcus Lindblom <macke at yar.nu> wrote:
> >> On 2010-04-14 10:05, Ravindra Parihar wrote:
> >>> Hi All,
> >>>
> >>> I only want few no. of lines in the log file after the build
> >>> completion. Currently I am receiving log of 1 MB which is too high.
> >>>
> >>> Please suggest how we can cut the no. of lines in the log file and
> >>> attach to the mail.
> >>
> >> I add the log files inline in the mail using python slice syntax.
> >>
> >> I.e. to get last 10 lines of a file with line-breaks between:
> >>
> >> '\n'.join(loglines[-10:])
> >>
> >> Cheers,
> >> /Marcus
More information about the devel
mailing list