Skip to content

Commit

Permalink
udpate deps
Browse files Browse the repository at this point in the history
  • Loading branch information
coryb committed Jul 28, 2018
1 parent 07ba74b commit d16bcc2
Show file tree
Hide file tree
Showing 237 changed files with 32,282 additions and 10,744 deletions.
57 changes: 30 additions & 27 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions cmd/jira/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ import (
"gopkg.in/op/go-logging.v1"
)

var (
log = logging.MustGetLogger("jira")
)
type oreoLogger struct {
logger *logging.Logger
}

var log = logging.MustGetLogger("jira")

func (ol *oreoLogger) Printf(format string, args ...interface{}) {
ol.logger.Debugf(format, args...)
}

func handleExit() {
if e := recover(); e != nil {
Expand Down Expand Up @@ -46,7 +52,7 @@ func main() {
panic(jiracli.Exit{Code: 1})
}

o := oreo.New().WithCookieFile(filepath.Join(jiracli.Homedir(), configDir, "cookies.js"))
o := oreo.New().WithCookieFile(filepath.Join(jiracli.Homedir(), configDir, "cookies.js")).WithLogger(&oreoLogger{log})

jiracmd.RegisterAllCommands()

Expand Down
4 changes: 4 additions & 0 deletions jiracli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"gopkg.in/AlecAivazis/survey.v1"
kingpin "gopkg.in/alecthomas/kingpin.v2"
yaml "gopkg.in/coryb/yaml.v2"
logging "gopkg.in/op/go-logging.v1"
)

type Exit struct {
Expand Down Expand Up @@ -219,6 +220,9 @@ func register(app *kingpin.Application, o *oreo.Client, fig *figtree.FigTree) {

cmd.Action(
func(_ *kingpin.ParseContext) error {
if logging.GetLevel("") > logging.DEBUG {
o = o.WithTrace(true)
}
return copy.Entry.ExecuteFunc(o, &globals)
},
)
Expand Down
5 changes: 0 additions & 5 deletions jiracli/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"os"
"strconv"

"github.com/coryb/oreo"
logging "gopkg.in/op/go-logging.v1"
)

Expand All @@ -14,10 +13,6 @@ var (

func IncreaseLogLevel(verbosity int) {
logging.SetLevel(logging.GetLevel("")+logging.Level(verbosity), "")
if logging.GetLevel("") > logging.DEBUG {
oreo.TraceRequestBody = true
oreo.TraceResponseBody = true
}
}

func InitLogging() {
Expand Down
Loading

0 comments on commit d16bcc2

Please sign in to comment.