Setting idp.logfiles property in idp.properties is ignored in IdP V4

Marc Jay marc.jay at taskize.com
Mon Jun 29 21:22:29 UTC 2020


Hi,

I'm in the process of upgrading from 3.4.6 to 4.0.1 and I noticed that the Shibboleth logs stopped being written to our custom log location (/var/log/shibboleth-idp) and went back to the default ${idp.home}/logs.

In both versions we are setting this in conf/idp.properties: "idp.logfiles=/var/log/shibboleth-idp" as per the docs, however it seems to be ignored in 4.0.1

From digging into this, it appears to be due to the order in which variables are loaded in conf/logback.xml combined with the fact that it is not configured to check for a previous definition first. The original being:

    <!--
    If you want to use custom properties in this config file,
    we load the main property file for you.
    -->
    <variable file="${idp.home}/conf/idp.properties" />

    <!-- Location and retention. -->

    <variable name="idp.logfiles" value="${idp.home}/logs" />

I have tested the following change in logback.xml and I'm seeing that our setting in idp.properties is respected, along with the default if it is not set:

    <!-- Location and retention. -->

    <variable name="idp.logfiles" value="${idp.logfiles:-${idp.home}/logs}" />

Naturally, moving the loading of the <variable file /> below the variable definition also solves the issue. 

There might be a good reason for this being the way that it is, but I just wanted to highlight this in case there was not.

Kind regards,

Marc



More information about the users mailing list