summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-19 04:48:45 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-19 04:48:45 -0400
commitbd9d90d8c48965e4e78fd56147c465ba80ec5ed5 (patch)
treee523e7db6eec1af33bb920680d24bacd64d8c588 /routers/repo
parentb192b70aecbe3b91affd9d9396669ed000a936d6 (diff)
downloadgitea-bd9d90d8c48965e4e78fd56147c465ba80ec5ed5.tar.gz
gitea-bd9d90d8c48965e4e78fd56147c465ba80ec5ed5.zip
Add some log
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/repo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 7171ff2640..08fe1ed15b 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -7,6 +7,7 @@ package repo
import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/auth"
+ "github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
)
@@ -23,6 +24,7 @@ func Create(ctx *middleware.Context, form auth.CreateRepoForm) {
_, err := models.CreateRepository(ctx.User, form.RepoName, form.Description,
form.Language, form.License, form.Visibility == "private", form.InitReadme == "on")
if err == nil {
+ log.Trace("%s Repository created: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, form.RepoName)
ctx.Render.Redirect("/"+ctx.User.Name+"/"+form.RepoName, 302)
return
} else if err == models.ErrRepoAlreadyExist {
@@ -48,6 +50,7 @@ func SettingPost(ctx *middleware.Context) {
if err := models.DeleteRepository(ctx.User.Id, ctx.Repo.Repository.Id, ctx.User.LowerName); err != nil {
ctx.Handle(200, "repo.Delete", err)
+ log.Trace("%s Repository deleted: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, ctx.Repo.Repository.LowerName)
return
}
}