Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed Feb 27, 2019
1 parent 2b7bfd7 commit a55f905
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/FreifunkBremen/yanic/webserver"
)

// Config represents the whole configuration
// ServeConfig represents the whole configuration
type ServeConfig struct {
Respondd respond.Config
Webserver webserver.Config
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/FreifunkBremen/yanic/cmd"
)

type Hook struct{}
type hook struct{}

func (hook *Hook) Fire(entry *log.Entry) error {
func (h *hook) Fire(entry *log.Entry) error {
switch entry.Level {
case log.PanicLevel:
entry.Logger.Out = os.Stderr
Expand All @@ -31,12 +31,12 @@ func (hook *Hook) Fire(entry *log.Entry) error {
return nil
}

func (hook *Hook) Levels() []stdLogger.Level {
func (h *hook) Levels() []stdLogger.Level {
return log.AllLevels
}

func main() {
log.AddHook(&Hook{})
log.AddHook(&hook{})

cmd.Execute()
}

0 comments on commit a55f905

Please sign in to comment.