Skip to content

Commit

Permalink
update access-log
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Dec 15, 2017
1 parent 1b217ca commit cc6b698
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 202 deletions.
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
"text/template"

"github.com/alecthomas/kingpin"
accesslog "github.com/codeskyblue/go-accesslog"
"github.com/go-yaml/yaml"
"github.com/goji/httpauth"
"github.com/gorilla/handlers"
accesslog "github.com/mash/go-accesslog"
)

type Configure struct {
Expand All @@ -44,17 +44,17 @@ type Configure struct {
} `yaml:"auth"`
}

type logger struct{}
type httpLogger struct{}

func (l logger) Log(record accesslog.LogRecord) {
func (l httpLogger) Log(record accesslog.LogRecord) {
log.Printf("%s - %s %d %s", record.Ip, record.Method, record.Status, record.Uri)
}

var (
defaultPlistProxy = "https://plistproxy.herokuapp.com/plist"
defaultOpenID = "https://some-hostname.com/openid/"
gcfg = Configure{}
l = logger{}
logger = httpLogger{}

VERSION = "unknown"
BUILDTIME = "unknown time"
Expand Down Expand Up @@ -156,7 +156,7 @@ func main() {

var hdlr http.Handler = ss

hdlr = accesslog.NewLoggingHandler(hdlr, l)
hdlr = accesslog.NewLoggingHandler(hdlr, logger)

// HTTP Basic Authentication
userpass := strings.SplitN(gcfg.Auth.HTTP, ":", 2)
Expand Down
1 change: 0 additions & 1 deletion vendor/github.com/mash/go-accesslog/.gitignore

This file was deleted.

49 changes: 0 additions & 49 deletions vendor/github.com/mash/go-accesslog/README.markdown

This file was deleted.

147 changes: 0 additions & 147 deletions vendor/github.com/mash/go-accesslog/accesslog.go

This file was deleted.

0 comments on commit cc6b698

Please sign in to comment.