Allow Macaron to be set to log through to gitea.log (#5667)

* Allow Macaron to be set to log through gitea.log

Fix #4291
This commit is contained in:
zeripath 2019-02-06 03:06:41 +00:00 committed by techknowlogick
parent 3b7f41f9f7
commit f286a5abb4
5 changed files with 76 additions and 7 deletions

View file

@ -393,10 +393,11 @@ var (
LibravatarService *libravatar.Libravatar
// Log settings
LogLevel string
LogRootPath string
LogModes []string
LogConfigs []string
LogLevel string
LogRootPath string
LogModes []string
LogConfigs []string
RedirectMacaronLog bool
// Attachment settings
AttachmentPath string
@ -767,6 +768,7 @@ func NewContext() {
LogLevel = getLogLevel("log", "LEVEL", "Info")
LogRootPath = Cfg.Section("log").Key("ROOT_PATH").MustString(path.Join(AppWorkPath, "log"))
forcePathSeparator(LogRootPath)
RedirectMacaronLog = Cfg.Section("log").Key("REDIRECT_MACARON_LOG").MustBool(false)
sec := Cfg.Section("server")
AppName = Cfg.Section("").Key("APP_NAME").MustString("Gitea: Git with a cup of tea")