ONLYOFFICE / Docker-DocumentServer

ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
GNU Affero General Public License v3.0
1.33k stars 455 forks source link

Logs aren't output to stdout after log rotation #736

Open capybara614 opened 1 month ago

capybara614 commented 1 month ago

Do you want to request a feature or report a bug?

This is a bug report.

What is the current behavior?

Logs are not outputted to stdout after logs are rotated. Logs are currently outputted to stdout using tail -f in the entrypoint. So when the file descriptor changes because of log rotation, tail isn't following the right files and doesn't output anything.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

Logs should be outputted to stdout even after log rotation.

I see two way of fixing this :

/var/log/onlyoffice/documentserver/*/.log /var/log/onlyoffice/documentserver-example/*.log { daily missingok rotate 30 compress dateext delaycompress notifempty copytruncate }



**Did this work in previous versions of DocumentServer?**

Yes. This [commit](https://github.com/ONLYOFFICE/Docker-DocumentServer/commit/0a42ee66b0c25c40375f471998d0470b68504d29) installs the `cron` package which made logrotate work as intended but broke logging to stdout as a result. 

**DocumentServer Docker tag:** 

v8.0.1.1

**Host Operating System:** 

Linux - 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May  7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
igwyd commented 1 month ago

Hello @capybara614, thank you for the detailed report, i can confirm - this is bug, issue #67888.

capybara614 commented 1 month ago

After looking at the repository of the package, seems like this is already fixed in the upcoming version. Should I close this or wait until v8.1.0 is released ?

igwyd commented 1 month ago

Yes, it's fixed. I would ask you not to close this issue, we will check it ourselves after relese. And of course you can check.