From 365e64290c747f1e8bfcf7ef3d4dc7a45914d315 Mon Sep 17 00:00:00 2001 From: deglot Date: Thu, 9 Feb 2017 14:13:08 -0500 Subject: [PATCH 1/2] Update README.md Adding a option to see logs of SimpleSAMLphp using docker logs command --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index ab9cea8..a53349f 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,18 @@ 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 +SAML_LOG_FILE=${SAML_FOLDER}/log/simplesamlphp.log + +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: ``` From 60257ac8619b86bb49f027071e283c75e5c9fd1a Mon Sep 17 00:00:00 2001 From: deglot Date: Thu, 9 Feb 2017 14:26:06 -0500 Subject: [PATCH 2/2] Update README.md Adding changes to php log (from syslog to file) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a53349f..c34177a 100644 --- a/README.md +++ b/README.md @@ -119,8 +119,12 @@ If you like, you can add the following commands in the file "httpd-foreground" i ``` 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