Class LoggedRemoteCommand

I am a RemoteCommand which gathers output from the
remote command into one or more local log files. My
self.logs dictionary contains references to these buildbot.status.builder.LogFile instances.
Any stdout/stderr/header updates from the slave will be put into
self.logs['stdio'], if it exists. If the remote command uses
other log files, they will go into other entries in
self.logs.

If you want to use stdout or stderr, you should create a LogFile named
'stdio' and pass it to my useLog() message. Otherwise stdout/stderr will
be ignored, which is probably not what you want.

Unless you tell me otherwise, when my command completes I will close
all the LogFiles that I know about.

the slave raised an exception while finishing the command (they
send back a remote_complete message with a Failure payload)

and also (for now):

slave disconnected while the command was running

This method should do cleanup, like closing log files. It should
normally return the 'failure' argument, so that any exceptions will be
propagated to the Step. If it wants to consume them, return None
instead.

useLog(self,
loog,
closeWhenFinished=False,
logfileName=None)

Start routing messages from a remote logfile to a local LogFile

I take a local ILogFile instance in 'loog', and arrange to route
remote log messages for the logfile named 'logfileName' into it. By
default this logfileName comes from the ILogFile itself (using the name
by which the ILogFile will be displayed), but the 'logfileName'
argument can be used to override this. For example, if
logfileName='stdio', this logfile will collect text from the stdout and
stderr of the command.

Parameters:

loog -
an instance which implements ILogFile

closeWhenFinished -
a boolean, set to False if the logfile will be shared between
multiple RemoteCommands. If True, the logfile will be closed when
this ShellCommand is done with it.

logfileName -
a string, which indicates which remote log file should be
routed into this ILogFile. This should match one of the keys of
the logfiles= argument to ShellCommand.