diff options
author | spf13 <steve.francia@gmail.com> | 2014-03-31 13:23:34 -0400 |
---|---|---|
committer | spf13 <steve.francia@gmail.com> | 2014-03-31 13:23:34 -0400 |
commit | e50b9d8ac1c69aa16cf45b1e4ff95b22d535adb7 (patch) | |
tree | 8c16489a5cf2631649805d547256d4427d9486d8 /hugolib/shortcode.go | |
parent | 2fa3761ec993657330d5b9ddbaaab1f58797fb61 (diff) |
Adding support for logging & verbose logging. Consolidation of error handling. Integration of jWalterWeatherman library. Fixed #137
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r-- | hugolib/shortcode.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index bea89fe2a..92e81195e 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -15,15 +15,14 @@ package hugolib import ( "bytes" - "fmt" - "github.com/spf13/hugo/template/bundle" "html/template" "reflect" "strings" "unicode" -) -var _ = fmt.Println + "github.com/spf13/hugo/template/bundle" + jww "github.com/spf13/jwalterweatherman" +) type ShortcodeFunc func([]string) string @@ -296,8 +295,8 @@ func ShortcodeRender(tmpl *template.Template, data *ShortcodeWithPage) string { buffer := new(bytes.Buffer) err := tmpl.Execute(buffer, data) if err != nil { - fmt.Println("error processing shortcode", tmpl.Name(), "\n ERR:", err) - fmt.Println(data) + jww.ERROR.Println("error processing shortcode", tmpl.Name(), "\n ERR:", err) + jww.WARN.Println(data) } return buffer.String() } |