-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Closed
Labels
Description
- Gitea version (or commit ref): 1.9.5 built with GNU Make 4.1, go1.12.11 : bindata, sqlite, sqlite_unlock_notify
- Operating system: Debian Stable
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
Description
I'm trying to prevent gitea from adding data/time/etc log flags to its console output. This is becuase the console output is automatically sent to syslog when using systemd to start gitea, and syslog adds its own date/time stamps.
This should be doable by setting log.console.FLAGS to none according to the config cheat sheet. However, setting log.console.FLAGS to none as no effect and console logs are still shown with the default stdflags stuff. Setting log.console.FLAGS to other values seem to work though (for example level or date work as expected).
Relevant config:
[log]
MODE = console,file
ROOT_PATH = /home/git/gitea/log
COLORIZE = false
; Put all router-related suff in files
ROUTER = file
REDIRECT_MACARON_LOG = true
[log.console]
; When using systemd, the console output is sent to syslog. So we
; don't need the data, time, etc as that is already in syslog.
FLAGS = "none"Example output on syslog:
Nov 5 17:06:04 server gitea[8484]: 2019/11/05 17:06:04 ...dules/setting/log.go:269:newLogService() [I] Gitea Log Mode: Console(Console:info)
Nov 5 17:06:04 server gitea[8484]: 2019/11/05 17:06:04 ...dules/setting/log.go:269:newLogService() [I] Gitea Log Mode: File(File:info)
Nov 5 17:06:04 server gitea[8484]: 2019/11/05 17:06:04 ...dules/setting/log.go:178:generateNamedLogger() [I] Macaron Log: File(file:info)
Nov 5 17:06:04 server gitea[8484]: 2019/11/05 17:06:04 ...dules/setting/log.go:178:generateNamedLogger() [I] Router Log: File(file:info)
Nov 5 17:06:04 server gitea[8484]: 2019/11/05 17:06:04 ...les/setting/cache.go:42:newCacheService() [I] Cache Service Enabled
Nov 5 17:06:04 server gitea[8484]: 2019/11/05 17:06:04 ...s/setting/session.go:45:newSessionService() [I] Session Service Enabled