Adding support for logging & verbose logging. Consolidation of error handling. Integration of jWalterWeatherman library. Fixed #137

This commit is contained in:
spf13
2014-03-31 13:23:34 -04:00
parent 2fa3761ec9
commit e50b9d8ac1
15 changed files with 140 additions and 111 deletions

View File

@@ -2,9 +2,10 @@ package hugolib
import (
"bytes"
"fmt"
"os/exec"
"strings"
jww "github.com/spf13/jwalterweatherman"
)
var summaryLength = 70
@@ -62,7 +63,7 @@ func getRstContent(content []byte) string {
var out bytes.Buffer
cmd.Stdout = &out
if err := cmd.Run(); err != nil {
fmt.Println(err)
jww.ERROR.Println(err)
}
rstLines := strings.Split(out.String(), "\n")