Skip to content

Commit

Permalink
config: resolve issue with serializing logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeneas Rekkas (arekkas) committed May 2, 2017
1 parent 6e4eeb4 commit cab66a1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ type Config struct {
CookieSecret string `mapstructure:"COOKIE_SECRET" yaml:"-"`
ForceHTTP bool `yaml:"-"`

Logger *logrus.Logger

cluster *url.URL `yaml:"-"`
oauth2Client *http.Client `yaml:"-"`
context *Context `yaml:"-"`
systemSecret []byte
logger *logrus.Logger `yaml:"-"`
cluster *url.URL `yaml:"-"`
oauth2Client *http.Client `yaml:"-"`
context *Context `yaml:"-"`
systemSecret []byte
}

func matchesRange(r *http.Request, ranges []string) error {
Expand Down Expand Up @@ -96,11 +95,11 @@ func newLogger() *logrus.Logger {
}

func (c *Config) GetLogger() *logrus.Logger {
if c.Logger == nil {
c.Logger = newLogger()
if c.logger == nil {
c.logger = newLogger()
}

return c.Logger
return c.logger
}

func (c *Config) DoesRequestSatisfyTermination(r *http.Request) error {
Expand Down

0 comments on commit cab66a1

Please sign in to comment.