Skip to content

Gitea is ignoring log settings (HTTP logs go to /var/log/syslog instead of http.log) #4291

@denysobukh

Description

@denysobukh
  • Gitea version (or commit ref):
    Gitea version 1.4.2 built with: bindata, sqlite
  • Git version:
    git version 2.17.1
  • Operating system:
    Ubuntu 18.04 LTS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • [ x] SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • [x ] Not relevant
  • Log gist:

Description:
Gitea is writing HTTP log messages to syslog instead of http.log
http.log is blank

app.ini

$ cat /etc/gitea/app.ini
APP_NAME = Gitea: Git with a cup of tea
RUN_USER = git
RUN_MODE = prod

[security]
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1Mjk0OTc2ODl9.k11pRjleUo0NLOWW3mXgVUe0sKHxGo3xYBUQ9-9qLFk
INSTALL_LOCK   = true
SECRET_KEY     = PIMRFge1XY

[database]
DB_TYPE  = sqlite3
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = gitea
PASSWD   =
SSL_MODE = disable
PATH     = data/gitea.db

[repository]
ROOT = /home/git/gitea-repositories

[server]
SSH_DOMAIN       = nas.loc
DOMAIN           = nas.loc
HTTP_PORT        = 3000
ROOT_URL         = http://nas.loc:3000/
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
LFS_JWT_SECRET   = qSVvvSnASiyepyZ0IXrjTN8t9jFr-qMJnWjQKbBvElY
OFFLINE_MODE     = false

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
DISABLE_REGISTRATION              = false
ENABLE_CAPTCHA                    = false
REQUIRE_SIGNIN_VIEW               = false
DEFAULT_KEEP_EMAIL_PRIVATE        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING       = true
NO_REPLY_ADDRESS                  = noreply.example.org

[picture]
DISABLE_GRAVATAR        = true
ENABLE_FEDERATED_AVATAR = false

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = Warn
ROOT_PATH = /var/lib/gitea/log

gitea dir
$ ls -la /var/lib/gitea/

total 24
drwxr-xr-x  6 git  git  4096 Jun 20 15:33 .
drwxr-xr-x 56 root root 4096 Jun 20 15:27 ..
drwxr-xr-x  2 git  git  4096 Jun 20 15:27 custom
drwxr-x---  6 git  git  4096 Jun 21 14:50 data
drwxr-x---  2 git  git  4096 Jun 20 15:27 indexers
lrwxrwxrwx  1 git  git    14 Jun 20 15:33 log -> /var/log/gitea
drwxr-xr-x  2 git  git  4096 Jun 20 15:27 public

gitea log dir

$ ls -la /var/log/gitea/
total 408
drwxr-xr-x  3 git  git      4096 Jun 21 00:07 .
drwxrwxr-x 19 root syslog   4096 Jun 21 06:25 ..
-rw-r-----  1 git  git       973 Jun 21 14:47 gitea.log
drwxr-xr-x  2 git  git      4096 Jun 20 15:53 hooks
-rw-r-----  1 git  git         0 Jun 20 15:37 http.log
-rw-r-----  1 git  git    170105 Jun 21 14:53 xorm.log
-rw-r-----  1 git  git    222214 Jun 20 23:57 xorm.log.2018-06-21.001

gitea.log

$ tail /var/log/gitea/gitea.log  -n 100
2018/06/20 15:37:14 [I] Log Mode: File(Info)
2018/06/20 15:37:14 [I] XORM Log Mode: File(Info)
2018/06/20 15:37:14 [I] Cache Service Enabled
2018/06/20 15:37:14 [I] Session Service Enabled
2018/06/20 15:37:14 [I] Git Version: 2.17.1
2018/06/20 15:37:14 [I] Git config user.name set to Gitea
2018/06/20 15:37:14 [I] Git config user.email set to gitea@fake.local
2018/06/20 15:37:14 [I] SQLite3 Supported
2018/06/20 15:37:14 [I] Run Mode: Production
2018/06/20 15:37:14 [I] First-time run install finished!
2018/06/20 15:37:14 [I] New random avatar created: 1
2018/06/21 13:41:07 [I] Log Mode: File(Info)
2018/06/21 13:41:07 [I] XORM Log Mode: File(Info)
2018/06/21 13:41:07 [I] Cache Service Enabled
2018/06/21 13:41:07 [I] Session Service Enabled
2018/06/21 13:41:07 [I] Git Version: 2.17.1
2018/06/21 13:41:07 [I] SQLite3 Supported
2018/06/21 13:41:07 [I] Run Mode: Production
2018/06/21 13:41:07 [I] Listen: http://0.0.0.0:3000
2018/06/21 13:41:07 [I] LFS server enabled

syslog

$ tail /var/log/syslog
Jun 21 14:53:08 nas systemd[1]: Started Gitea (Git with a cup of tea).
Jun 21 14:53:08 nas gitea[17243]: 2018/06/21 14:53:08 #033[1;36m[T] AppPath: /usr/local/bin/gitea#033[0m
Jun 21 14:53:08 nas gitea[17243]: 2018/06/21 14:53:08 #033[1;36m[T] AppWorkPath: /var/lib/gitea#033[0m
Jun 21 14:53:08 nas gitea[17243]: 2018/06/21 14:53:08 #033[1;36m[T] Custom path: /var/lib/gitea/custom#033[0m
Jun 21 14:53:08 nas gitea[17243]: 2018/06/21 14:53:08 #033[1;36m[T] Log path: /var/lib/gitea/log#033[0m
Jun 21 14:53:08 nas gitea[17243]: 2018/06/21 14:53:08 #033[1;32m[I] Gitea v1.4.2 built with: bindata, sqlite#033[0m
Jun 21 14:53:08 nas gitea[17243]: 2018/06/21 14:53:08 Serving [::]:3000 with pid 17243
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Started GET / for 192.168.88.252
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Completed GET / 200 OK in 31.275567ms
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Started GET /vendor/assets/octicons/octicons.min.css for 192.168.88.252
Jun 21 14:54:23 nas gitea[17243]: [Macaron] [Static] Serving /vendor/assets/octicons/octicons.min.css
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Completed GET /vendor/assets/octicons/octicons.min.css 200 OK in 15.213746ms
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Started GET /vendor/assets/font-awesome/css/font-awesome.min.css for 192.168.88.252
Jun 21 14:54:23 nas gitea[17243]: [Macaron] [Static] Serving /vendor/assets/font-awesome/css/font-awesome.min.css
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Completed GET /vendor/assets/font-awesome/css/font-awesome.min.css 200 OK in 4.31435ms
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Started GET /api/v1/repos/search?uid=1&q=&limit=15&mode= for 192.168.88.252
Jun 21 14:54:23 nas gitea[17243]: [Macaron] 2018-06-21 14:54:23: Completed GET /api/v1/repos/search?uid=1&q=&limit=15&mode= 200 OK in 8.651964ms

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions