Redirecting sugarcrm.log to stdout = black hole

We're running sugarcrm 8.0.6 ENT inside of a Docker container, and I'm trying to redirect the application logs to stdout/stderr so we can consume them with CloudWatch.

I have the following setup in our Dockerfile:

RUN set -ex \
    && . "/etc/apache2/envvars" \
    && ln -sf /dev/stdout "$APACHE_LOG_DIR/access.log" \
    && ln -sf /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log" \
    && ln -sf /dev/stderr "$APACHE_LOG_DIR/error.log" \
    && ln -sf /dev/stdout "$APACHE_LOG_DIR/sugarcrm.log" \
    && ln -sf /dev/stderr "$APACHE_LOG_DIR/php_error.log"

And it's working fine for the Apache access/error and PHP logs, however Sugar refuses to write to /dev/stdout and I'm wondering if it's something to do with the way the Logger class is trying to write to the file?

Does anyone have experience with this?

Parents Reply Children
No Data