Skip to content

Commit

Permalink
update go mod for new icap-client version; Set client side debug opti…
Browse files Browse the repository at this point in the history
…ons during service creation
  • Loading branch information
Anondo committed Aug 9, 2020
1 parent 83bf667 commit 347b859
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
github.com/egirna/icap v0.0.0-20181108071049-d5ee18bd70bc
github.com/egirna/icap-client v0.0.11
github.com/egirna/icap-client v0.1.1
github.com/h2non/filetype v1.0.12
github.com/spf13/viper v1.6.2
)
2 changes: 1 addition & 1 deletion service/icap.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func init() {
ic.SetDebugMode(false)

}

// RemoteICAPService represents the remote icap service informations
Expand Down
5 changes: 5 additions & 0 deletions service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package service

import (
"bytes"
"icapeg/config"
"icapeg/dtos"
"icapeg/logger"
"io"
Expand Down Expand Up @@ -109,5 +110,9 @@ func GetLocalService(name string) LocalService {

// GetICAPService returns a remote ICAP service based on the name
func GetICAPService(name string) ICAPService {
if config.App().LogLevel == logger.LogLevelDebug {
ic.SetDebugMode(true)
ic.SetDebugOutput(logger.LogFile())
}
return NewRemoteICAPService(name)
}

0 comments on commit 347b859

Please sign in to comment.