Skip to content

Commit

Permalink
Logging improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
drichelson committed May 26, 2024
1 parent d5679fb commit 51b1da9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/dorkly/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package dorkly
import (
"context"
"errors"
"fmt"
"go.uber.org/zap"
"reflect"
)
Expand Down Expand Up @@ -158,14 +157,14 @@ func reconcile(old, new RelayArchive) (RelayArchive, error) {
// https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
func runStep(step string, f func() error) error {
//fmt.Printf("\n[%s] BEGIN\n", step)
fmt.Printf("::group::%s\n", step)
logger.Infof("\n::group::%s", step)
logger.Infof("Starting step: %s", step)
err := f()
//if err != nil {
// fmt.Printf("[%s] ERROR: %v\n", step, err)
//}
logger.Infof("Ending step: %s", step)
fmt.Printf("::endgroup::\n")
logger.Infof("\n::endgroup::")
//fmt.Printf("[%s] END\n", step)
return err
}
Expand Down

0 comments on commit 51b1da9

Please sign in to comment.