Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Log to STDOUT Feature #5721

Merged
merged 1 commit into from
Apr 10, 2017
Merged

Add Log to STDOUT Feature #5721

merged 1 commit into from
Apr 10, 2017

Conversation

Jitsusama
Copy link
Contributor

I've written this feature addition in order to scratch my own personal itch. When running roundcube under Docker, logs can either go to syslog or file. Since PHP-FPM creates worker pools with restricted permissions, there is no way to symlink a log file to PID 1's STDOUT, so Docker can't log roundcube logs. syslog works, but the whole idea of a docker container is to not have multiple processes running in a container.

This code allows roundcube to write straight to STDOUT, which PHP-FPM can grab when configured with catch_workers_output = true and output to the Docker container's STDOUT when php-fpm is run with the -F and -O options like so: php-fpm -F -O.

I would love to have this merged into master if you find it of use. I'm currently running this code against the 1.2.4 tag (cbd3562) without issue.

I've tried to put in some documentation where I could find it. If there is another area of documentation that could be buffed up to include this, point me in the right direction and I don't mind adding it to the PR.

Thanks for your consideration!

Primarily useful for PHP applications running under PHP-FPM which in
turn is running within a Docker container. But also it is generally
useful in any situation where you want to be able to send the logs
directly to your terminal when debugging &etc.
@alecpl alecpl merged commit 40b51b9 into roundcube:master Apr 10, 2017
@Jitsusama Jitsusama deleted the log-to-stdout branch April 10, 2017 12:35
ZiBiS added a commit to ZiBiS/roundcubemail that referenced this pull request Apr 13, 2017
* 'master' of https://github.com/roundcube/roundcubemail: (36 commits)
  Remove note about mail() function
  Update changelog
  Revert "extend plugin password to avoid sudo (use ssh instead calling chpasswd) (roundcube#5654)"
  Add Log to STDOUT Feature (roundcube#5721)
  extend plugin password to avoid sudo (use ssh instead calling chpasswd) (roundcube#5654)
  Fix bug where base_dn setting was ignored inside group_filters (roundcube#5720)
  Bump Net_Socket version
  Installer: Fix DB schema initialization on MS SQL Server
  Update to TinyMCE 4.5.6
  Fix undesired effects when postgres database uses different timezone than PHP host (roundcube#5708)
  Fix bug where namespace prefix could not be truncated on folders list if show_real_foldernames=true (roundcube#5695)
  Fix (restore) Tab key behaviour in autocomplete popup (roundcube#5659)
  Fix regression in LDAP fuzzy search where it always used prefix search instead (roundcube#5713)
  Ignore js deps (roundcube#5704)
  Update changelog
  Add support for DelSp=Yes messages (roundcube#5702)
  Fix permission of temporary files and removal of them when generating thumbnails
  Remove redundant entry
  Fix require entry for crypt_gpg also in Enigma's composer.json
  Use jQuery 3.2.1
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants