summaryrefslogtreecommitdiffstats
path: root/update.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-26 00:05:09 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-26 00:05:09 +0800
commit1284d99fd27e3de6632b9c7ecc55fd4b10198d41 (patch)
treeee9bcd985a7d2745ac89cd2576445b7f46f5da63 /update.go
parent9b509054cf8ef8e15cf567614aef46fe12571904 (diff)
downloadgitea-1284d99fd27e3de6632b9c7ecc55fd4b10198d41.tar.gz
gitea-1284d99fd27e3de6632b9c7ecc55fd4b10198d41.zip
bug fixed
Diffstat (limited to 'update.go')
-rw-r--r--update.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/update.go b/update.go
index ebc51b2a0c..242282ecf8 100644
--- a/update.go
+++ b/update.go
@@ -5,10 +5,10 @@
package main
import (
-"fmt"
"os"
"github.com/codegangsta/cli"
-"github.com/gogits/gogs/modules/log"
+//"github.com/gogits/gogs/modules/log"
+"github.com/qiniu/log"
)
var CmdUpdate = cli.Command{
@@ -22,16 +22,18 @@ gogs serv provide access auth for repositories`,
// for command: ./gogs update
func runUpdate(c *cli.Context) {
- level := "0"
- os.MkdirAll("log", os.ModePerm)
- log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, "log/serv.log"))
- log.Info("start update logging...")
+ //level := "0"
+ //os.MkdirAll("log", os.ModePerm)
+ //log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, "log/serv.log"))
+ //log.Info("start update logging...")
- //w, _ := os.Create("update.log")
- //log.SetOutput(w)
+ w, _ := os.Create("update.log")
+ defer w.Close()
+
+ log.SetOutput(w)
for i, arg := range c.Args() {
- log.Info("%d : %s", i, arg)
-}
+ log.Info(i, arg)
+ }
/*userName := os.Getenv("userName")
userId := os.Getenv("userId")
repoId := os.Getenv("repoId")