mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Remove qiniu/log
This commit is contained in:
@@ -6,13 +6,16 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/gogits/logs"
|
||||
)
|
||||
|
||||
var (
|
||||
loggers []*logs.BeeLogger
|
||||
loggers []*logs.BeeLogger
|
||||
GitLogger *logs.BeeLogger
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -38,6 +41,12 @@ func NewLogger(bufLen int64, mode, config string) {
|
||||
}
|
||||
}
|
||||
|
||||
func NewGitLogger(logPath string) {
|
||||
os.MkdirAll(path.Dir(logPath), os.ModePerm)
|
||||
GitLogger = logs.NewLogger(0)
|
||||
GitLogger.SetLogger("file", fmt.Sprintf(`{"level":0,"filename":"%s","rotate":false}`, logPath))
|
||||
}
|
||||
|
||||
func Trace(format string, v ...interface{}) {
|
||||
for _, logger := range loggers {
|
||||
logger.Trace(format, v...)
|
||||
|
Reference in New Issue
Block a user