diff --git a/README.md b/README.md index ab9cea8..c34177a 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,22 @@ Adapters should generate their own private key and get the CSR signed by a trust ### Logging This image does not use the standard Docker logging mechanism, but the native OS-based logging. +If you like, you can add the following commands in the file "httpd-foreground" in order to build an image that logs SimpleSAMLphp info to syslog and that you can check with `docker logs -f `: + +``` +SAML_FOLDER=/var/simplesamlphp +FULL_CONFIG_PATH=${SAML_FOLDER}/config/config.php +SAML_LOG_FILE=${SAML_FOLDER}/log/simplesamlphp.log + +sed -i "s/'syslog',/'file',/g" ${FULL_CONFIG_PATH} +sed -i "s#;error_log = syslog#error_log = /dev/console#g" ${FULL_CONFIG_PATH} + +touch ${SAML_LOG_FILE} +chown apache:apache ${SAML_LOG_FILE} +chmod a+rw /dev/console +ln -sf /dev/console ${SAML_LOG_FILE} +``` + ## Building from source: ```