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

relauto: logger prints error message in builds #541

Closed
jahkeup opened this issue Nov 20, 2019 · 2 comments
Closed

relauto: logger prints error message in builds #541

jahkeup opened this issue Nov 20, 2019 · 2 comments
Assignees
Labels
type/bug Something isn't working

Comments

@jahkeup
Copy link
Member

jahkeup commented Nov 20, 2019

Platform I'm building on:

CodeBuild

What I expected to happen:

The build log to be clean and contain messages relevant to the build itself.

What actually happened:

The build log contains error messages regarding the use of logger as the logging facility /dev/log is not available in the build environment.

How to reproduce the problem:

Run a build.

@jahkeup jahkeup self-assigned this Nov 20, 2019
@jahkeup
Copy link
Member Author

jahkeup commented Dec 2, 2019

I mitigated the issue in a branch 15e9c4a734c09e4f5ad9b941af0ccdef97879679 using a function to shim in the required behavior:

# As a shell function (at top of scripts) to shim in:
logger() { command logger --socket-errors=off "$@"; }

@zmrow zmrow added the type/bug Something isn't working label Dec 20, 2019
jahkeup added a commit that referenced this issue Jan 13, 2020
This polyfill implementation of `logger` handles scenarios where the
environment isn't fully initialized or where the logger stub isn't able
to be run. Falling back to `printf` eliminates logged errors from these
places and in their place prints the expected messages.
jahkeup added a commit that referenced this issue Jan 14, 2020
ci: polyfill logger in edge cases for #541
@jahkeup
Copy link
Member Author

jahkeup commented Jan 15, 2020

Fixed with the merge of #647 into develop.

@jahkeup jahkeup closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants