Startup log messages are not structured
We saw after hup'ing gitaly the following in the logs:
{"error":"new child pid=25816 timed out","level":"error","msg":"Upgrade failed","time":"2019-11-20T00:20:25Z"}
time="2019-11-20T00:20:25Z" level=info msg="Starting Gitaly" version="Gitaly, version 1.72.0-14-gba4abcb7"
time="2019-11-20T00:20:25Z" level=warning msg="git path not configured. Using default path resolution" resolvedPath=/opt/gitlab/embedded/bin/git
time="2019-11-20T00:20:25Z" level=info msg="clearing disk cache object folder" storage=default
time="2019-11-20T00:20:25Z" level=info msg="moving disk cache object folder to /mnt/storage/git-data/repositories/+gitaly/tmp/diskcache486376815" storage=default
time="2019-11-20T00:20:25Z" level=info msg="disk cache object folder doesn't exist, no need to remove" storage=default
time="2019-11-20T00:20:25Z" level=info msg="Starting file walker for /mnt/storage/git-data/repositories/+gitaly/cache" storage=default
time="2019-11-20T00:20:25Z" level=info msg="Starting file walker for /mnt/storage/git-data/repositories/+gitaly/state" storage=default
{"address":"/var/opt/gitlab/gitaly/gitaly.socket","level":"info","msg":"listening at unix address","time":"2019-11-20T00:20:25Z"}
These extra log messages are not structured json which is going to mean they will be dropped by central logging. Is it possible to intercept these logs and format them as json?
cc @nolith
Edited by John Jarvis