mirror of https://github.com/gogits/gogs.git
Unknown
11 years ago
8 changed files with 84 additions and 5 deletions
@ -1,3 +1,4 @@ |
|||||||
gogs |
gogs |
||||||
*.exe |
*.exe |
||||||
*.exe~ |
*.exe~ |
||||||
|
.DS_Store |
@ -1 +1,5 @@ |
|||||||
APP_NAME = Go Git Service |
APP_NAME = Go Git Service |
||||||
|
|
||||||
|
[server] |
||||||
|
HTTP_ADDR = |
||||||
|
HTTP_PORT = 3000 |
@ -0,0 +1,24 @@ |
|||||||
|
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package utils |
||||||
|
|
||||||
|
import ( |
||||||
|
"fmt" |
||||||
|
"os" |
||||||
|
|
||||||
|
"github.com/Unknwon/goconfig" |
||||||
|
) |
||||||
|
|
||||||
|
var Cfg *goconfig.ConfigFile |
||||||
|
|
||||||
|
func init() { |
||||||
|
var err error |
||||||
|
Cfg, err = goconfig.LoadConfigFile("conf/app.ini") |
||||||
|
if err != nil { |
||||||
|
fmt.Println("Cannot load config file 'app.ini'") |
||||||
|
os.Exit(2) |
||||||
|
} |
||||||
|
Cfg.BlockMode = false |
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Package log is a wrapper of logs for short calling name.
|
||||||
|
package log |
||||||
|
|
||||||
|
import ( |
||||||
|
"github.com/gogits/logs" |
||||||
|
) |
||||||
|
|
||||||
|
var logger *logs.BeeLogger |
||||||
|
|
||||||
|
func init() { |
||||||
|
logger = logs.NewLogger(10000) |
||||||
|
logger.SetLogger("console", "") |
||||||
|
} |
||||||
|
|
||||||
|
func Info(format string, v ...interface{}) { |
||||||
|
logger.Info(format, v...) |
||||||
|
} |
Loading…
Reference in new issue