本文整理匯總了Golang中github.com/getgauge/gauge/logger.GaugeLogger.Error方法的典型用法代碼示例。如果您正苦於以下問題:Golang GaugeLogger.Error方法的具體用法?Golang GaugeLogger.Error怎麽用?Golang GaugeLogger.Error使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/getgauge/gauge/logger.GaugeLogger
的用法示例。
在下文中一共展示了GaugeLogger.Error方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: printStatus
func printStatus(executionResult *gauge_messages.ProtoExecutionResult, logger *logger.GaugeLogger) {
logger.Error("Error Message: %s", executionResult.GetErrorMessage())
stacktrace := executionResult.GetStackTrace()
stacktrace = strings.Replace(stacktrace, "\n", "\n\t", -1)
logger.Error("Stacktrace: %s", stacktrace)
}
示例2: startStream
func (e *parallelSpecExecution) startStream(specs *specList, log *logger.GaugeLogger, suiteResultChannel chan *result.SuiteResult) {
defer e.wg.Done()
testRunner, err := runner.StartRunnerAndMakeConnection(e.manifest, log, make(chan bool))
if err != nil {
log.Error("Failed to start runner. Reason: %s", err.Error())
suiteResultChannel <- &result.SuiteResult{UnhandledErrors: []error{errors.New(fmt.Sprintf("Failed to start runner. %s", err.Error()))}}
return
}
simpleExecution := newSimpleExecution(&executionInfo{e.manifest, make([]*parser.Specification, 0), testRunner, e.pluginHandler, nil, log, e.errMaps})
result := simpleExecution.executeStream(specs)
suiteResultChannel <- result
}
示例3: setStepFailure
func setStepFailure(executionInfo *gauge_messages.ExecutionInfo, logger *logger.GaugeLogger) {
setScenarioFailure(executionInfo)
logger.Error("Failed step: %s", executionInfo.CurrentStep.Step.GetActualStepText())
executionInfo.CurrentStep.IsFailed = proto.Bool(true)
}
示例4: printStatus
func printStatus(executionResult *gauge_messages.ProtoExecutionResult, logger logger.GaugeLogger) {
logger.Error("Error Message: %s", executionResult.GetErrorMessage())
stacktrace := executionResult.GetStackTrace()
logger.Error("Stacktrace: %s", stacktrace)
}