Skip to content

Commit

Permalink
add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
vintikzzz committed Nov 30, 2024
1 parent 4770c60 commit d72a329
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"crypto/md5"
"encoding/hex"
"errors"
log "github.com/sirupsen/logrus"
"html/template"
"os"
"path/filepath"
Expand Down Expand Up @@ -361,7 +362,9 @@ func (s *Template) ToString(c *gin.Context, obj any) (res string, err error) {
return
}
}
re, _ := s.tm.re.Instance(v, s.tm.contextWrapper(c, obj, nil)).(render.HTML)
data := s.tm.contextWrapper(c, obj, nil)
log.Infof("action template %v data: %+v", s.name, data)
re, _ := s.tm.re.Instance(v, data).(render.HTML)
err = re.Template.Execute(&b, re.Data)
if err != nil {
return
Expand Down

0 comments on commit d72a329

Please sign in to comment.