Logging from an AttributeFilterScript

Max Spicer max.spicer at york.ac.uk
Fri Jan 27 16:37:24 UTC 2023


*sigh* There's nothing like asking a question to make you realise the
answer yourself!

My logging is working as expected. It, of course, will only log if there
are actually EntityAttributes present in the metadata to which the filter
is being applied.

Regards,

Max

On Fri, 27 Jan 2023 at 16:07, Max Spicer <max.spicer at york.ac.uk> wrote:

> I've been trying to add some debug logging to my metadata filters so I can
> track for my own understanding when/if they apply and in what order.
> Assuming the logging configuration doesn't suppress the message, is there
> any more general reason why the following shouldn't log when the
> MetadataFilter runs?
>
> <MetadataFilter xsi:type="EntityAttributes">
> <AttributeFilterScript>
> <Script>
> <![CDATA[
> (function (attribute) {
> "use strict";
>
> var logger = Java.type("org.slf4j.LoggerFactory").getLogger("testLogger");
> logger.error('Hello?');
>
> return true;
> }(input));
> ]]>
> </Script>
> </AttributeFilterScript>
> </MetadataFilter>
>
> I'm running IdP 4.2.1 and have used this approach to log from scripts in
> the past but am not seeing any output from this at present. I can see from
> the opensaml logging that the metadata filter itself is being applied.
>
> Thanks,
>
> Max Spicer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20230127/8d29a5c3/attachment.htm>


More information about the users mailing list