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

BCDA-624: Use os.O_APPEND mode for error/request logs #93

merged 1 commit into from Dec 4, 2018


None yet
5 participants

rnagle commented Dec 3, 2018

Fixes BCDA-624

Makes bcda use "append" mode when opening log files to prevent the issue described here:

Proposed changes:

  • Update locations where bcda opens BB_ERROR_LOG, BCDA_REQUEST_LOG and BCDA_ERROR_LOG to use os.O_APPEND mode.

@rnagle rnagle requested review from embh and msnook Dec 3, 2018


This comment has been minimized.


msnook commented Dec 4, 2018

I have verified this implementation and have seen it working when setting logrotate configuration to initiate the log rotation based on file size (to force the log rotation). However, to be certain, I'd like to see our daily logrotate configuration execute. The daily rotation occurs at ~3:25AM according to the cron.daily documentation (this time coincides with all the historical logs on test and sbx).
If tomorrow's new version of request.log exists with no binary data after the daily log rotation, then I will be satisfied and approve.


Checked this morning. Data flowing nicely in Splunk with no interruptions.
Also, request.log contains no binary data.
Looks good! 👍

screen shot 2018-12-04 at 8 10 13 am

@rnagle rnagle force-pushed the rnagle/append-mode branch from 9238cb1 to c969a2a Dec 4, 2018


tbellj approved these changes Dec 4, 2018

Simple change, nice!

@rnagle rnagle merged commit 2fcbe95 into master Dec 4, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@rnagle rnagle deleted the rnagle/append-mode branch Dec 4, 2018


Minimal change; code matches Go documentation for append/create.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment