<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>​<br>
</p>
<p>Ok, I have seen this class but how does it fit into the code?  I can only see examples of using this class with the old-style steps which use the 'start' method.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Pierre Tardy <tardyp@gmail.com><br>
<b>Sent:</b> Monday, February 19, 2018 11:26 PM<br>
<b>To:</b> Hugh Sorby<br>
<b>Cc:</b> users@buildbot.net<br>
<b>Subject:</b> Re: [users@bb.net] Help with new buildstep.</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi,
<div>What you need is a logobserver.</div>
<div><a href="http://docs.buildbot.net/latest/developer/cls-logobserver.html">http://docs.buildbot.net/latest/developer/cls-logobserver.html</a><br>
</div>
<div><br>
</div>
<div>There is a <span style="background-color:rgb(246,246,246); font-family:monospace; font-size:14.625px; font-weight:700">LineConsumerLogObserver </span>which can be used to read the logs one line by one line.</div>
<div>This component is optimised to manage the data on the flow, and avoid consuming lots of memory by loading the log in memory.</div>
<div><br>
</div>
<div>Regards</div>
<div>Pierre</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Feb 19, 2018 at 3:54 AM Hugh Sorby <<a href="mailto:h.sorby@auckland.ac.nz">h.sorby@auckland.ac.nz</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi All,<br>
</p>
<p><br>
</p>
<p>I'm trying to update an old buildstep to the 'new-style'.  What I used to do was pass the stdio log line by line looking for a matching string.  Now using the 'run' method I have<br>
</p>
<p><br>
</p>
<div>    @defer.inlineCallbacks</div>
<div>    def run(self):</div>
<div>        command = self.command</div>
<div><br>
</div>
<div>        cmd = yield self.makeRemoteShellCommand(command=command, collectStdout=True, stdioLogName="stdoutLog")</div>
<div><br>
</div>
<div>        yield self.runCommand(cmd)</div>
<div><br>
</div>
<div>        defer.returnValue(cmd.results())<br>
</div>
<div><br>
</div>
<div>but I'm unsure of how or when I should parse the log and set the result.  I don't actually think I need to collect stdout but I have left it in here as I was testing out some ideas.<br>
</div>
<div><br>
</div>
<div>Many thanks for any help or pointers,<br>
</div>
<div>Hugh.<br>
</div>
<p><br>
</p>
</div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote>
</div>
</div>
</div>
</body>
</html>