mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 23:30:29 +00:00
Report errors by setting raw_output when it's error level (#645)
This solves #643 by setting the "raw_output" entry attribute when the log level is error. This results in the log line being shipped to the Gitea UI. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/645 Reviewed-by: Zettat123 <[email protected]> Co-authored-by: Pablo Carranza <[email protected]> Co-committed-by: Pablo Carranza <[email protected]>
This commit is contained in:
1 parent
5302c25feb
commit
6a9a447f86
2 files changed
+39
-26
No files matched your search
@@ -143,6 +143,12 @@ func (r *Reporter) Fire(entry *log.Entry) error {
|
||||
if step.StartedAt == nil {
|
||||
step.StartedAt = timestamppb.New(timestamp)
|
||||
}
|
||||
|
||||
// Force reporting log errors as raw output to prevent silent failures
|
||||
if entry.Level == log.ErrorLevel {
|
||||
entry.Data["raw_output"] = true
|
||||
}
|
||||
|
||||
if v, ok := entry.Data["raw_output"]; ok {
|
||||
if rawOutput, ok := v.(bool); ok && rawOutput {
|
||||
if row := r.parseLogRow(entry); row != nil {
|
||||
|
||||
Reference in new issue
Block a user