summaryrefslogtreecommitdiffstats
path: root/serve.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-24 22:26:05 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-24 22:26:05 +0800
commit48ea9b12f65e21c8584eb89224bda4ad6c635847 (patch)
tree34b9deb103ee807edb300852c9aa87f70f684b71 /serve.go
parent97e82a0ff6286fd0a42281cd1e34dd734110e2f4 (diff)
downloadgitea-48ea9b12f65e21c8584eb89224bda4ad6c635847.tar.gz
gitea-48ea9b12f65e21c8584eb89224bda4ad6c635847.zip
add log
Diffstat (limited to 'serve.go')
-rw-r--r--serve.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/serve.go b/serve.go
index b84fa2a4e5..ca79973a66 100644
--- a/serve.go
+++ b/serve.go
@@ -44,6 +44,10 @@ gogs serv provide access auth for repositories`,
Flags: []cli.Flag{},
}
+func init() {
+ log.NewLogger(10000, "file", fmt.Sprintf(`{"filename":"%s"}`, "log/serv.log"))
+}
+
func parseCmd(cmd string) (string, string) {
ss := strings.SplitN(cmd, " ", 2)
if len(ss) != 2 {
@@ -227,7 +231,7 @@ func runServ(k *cli.Context) {
return
}
if ref, ok = refs[refname]; !ok {
- println("unknow reference name -", refname, "-")
+ log.Trace("unknow reference name -", refname, "-", b.String())
return
}
l, err = ref.AllCommits()