def command_log(self, package, msg): if package not in self.__command_log: raise RuntimeError("Command log received for package '{0}' before package job started: '{1}'" .format(package, msg)) if self.__command_log[package].current_cmd is None: raise RuntimeError("Command log received for package '{0}' before command started: '{1}'" .format(package, msg)) self.__command_log[package].append(msg) if not self.color: msg = remove_ansi_escape(msg) if not self.quiet and self.interleave: msg = msg.rstrip(ansi('reset')) msg = msg.rstrip() if self.interleave and self.prefix_output: wide_log(clr("[{package}] {msg}").format(**locals())) else: wide_log(msg)
def command_log(self, package, msg): if package not in self.__command_log: raise RuntimeError( "Command log received for package '{0}' before package job started: '{1}'" .format(package, msg)) if self.__command_log[package].current_cmd is None: raise RuntimeError( "Command log received for package '{0}' before command started: '{1}'" .format(package, msg)) self.__command_log[package].append(msg) if not self.color: msg = remove_ansi_escape(msg) if not self.quiet and self.interleave: msg = msg.rstrip(ansi('reset')) msg = msg.rstrip() if self.interleave and self.prefix_output: wide_log(clr("[{package}] {msg}").format(**locals())) else: wide_log(msg)
fmt('@!' + sanitize('') + '@|'), "[{package}] ==> '{cmd.cmd_str}' in '{location}'": fmt("[@{cf}{package}@|] @!@{bf}==>@| '@!{cmd.cmd_str}@|' @{kf}@!in@| '@!{location}@|'" ), "Starting ==> {package}": fmt("Starting @!@{gf}==>@| @!@{cf}{package}@|"), "[{package}] {msg}": fmt("[@{cf}{package}@|] {msg}"), "[{package}] <== '{cmd.cmd_str}' failed with return code '{retcode}'": fmt("[@{cf}{package}@|] @!@{rf}<==@| '@!{cmd.cmd_str}@|' @{rf}failed with return code@| '@!{retcode}@|'" ), "[{package}] <== '{cmd.cmd_str}' finished with return code '{retcode}'": fmt("[@{cf}{package}@|] @{gf}<==@| '@!{cmd.cmd_str}@|' finished with return code '@!{retcode}@|'" ), "Finished <== {package:<": fmt("@!@{kf}Finished@| @{gf}<==@| @{cf}{package:<").rstrip(ansi('reset')), "Failed <== {package:<": fmt("@!@{rf}Failed@| @{gf}<==@| @{cf}{package:<").rstrip(ansi('reset')), "} [ {time} ]": fmt("}@| [ @{yf}{time}@| ]"), "[build - {run_time}] ": fmt("[@{pf}build@| - @{yf}{run_time}@|] "), "[{name} - {run_time}] ": fmt("[@{cf}{name}@| - @{yf}{run_time}@|] "), "[{0}/{1} Active | {2}/{3} Completed]": fmt("[@!@{gf}{0}@|/@{gf}{1}@| Active | @!@{gf}{2}@|/@{gf}{3}@| Completed]" ), "[{0}/{1} Jobs | {2}/{3} Active | {4}/{5} Completed]": fmt("[@!@{gf}{0}@|/@{gf}{1}@| Jobs | @!@{gf}{2}@|/@{gf}{3}@| Active | @!@{gf}{4}@|/@{gf}{5}@| Completed]" ), "[!{package}] ":
fmt("[@{cf}{package}@|] @!@{bf}==>@| '@!{cmd.cmd_str}@|' @{kf}@!in@| '@!{location}@|'"), "Starting ==> {package}": fmt("Starting @!@{gf}==>@| @!@{cf}{package}@|"), "[{package}] {msg}": fmt("[@{cf}{package}@|] {msg}"), "[{package}] <== '{cmd.cmd_str}' failed with return code '{retcode}'": fmt("[@{cf}{package}@|] @!@{rf}<==@| '@!{cmd.cmd_str}@|' @{rf}failed with return code@| '@!{retcode}@|'"), "[{package}] <== '{cmd.cmd_str}' finished with return code '{retcode}'": fmt("[@{cf}{package}@|] @{gf}<==@| '@!{cmd.cmd_str}@|' finished with return code '@!{retcode}@|'"), "Finished <== {package:<": fmt("@!@{kf}Finished@| @{gf}<==@| @{cf}{package:<").rstrip(ansi('reset')), "Failed <== {package:<": fmt("@!@{rf}Failed@| @{gf}<==@| @{cf}{package:<").rstrip(ansi('reset')), "} [ {time} ]": fmt("}@| [ @{yf}{time}@| ]"), "[build - {run_time}] ": fmt("[@{pf}build@| - @{yf}{run_time}@|] "), "[{name} - {run_time}] ": fmt("[@{cf}{name}@| - @{yf}{run_time}@|] "), "[{0}/{1} Active | {2}/{3} Completed]": fmt("[@!@{gf}{0}@|/@{gf}{1}@| Active | @!@{gf}{2}@|/@{gf}{3}@| Completed]"),