Skip to content

Commit

Permalink
Log INFO metadata on entities
Browse files Browse the repository at this point in the history
See ukf/ukf-meta#63.
  • Loading branch information
iay committed Jun 11, 2021
1 parent f5dc916 commit dbadbb4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,8 @@
<propertyset refid="mda.properties"/>
</syspropertyset>
<jvmarg value="-enableassertions"/>
<arg value="--quiet"/>
<arg value="--logConfig"/>
<arg value="${tools.dir}/mda-logging.xml"/>
<arg value="@{config}"/>
<arg value="@{pipeline}"/>
</java>
Expand Down
15 changes: 15 additions & 0 deletions mdx/common-beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,21 @@
</property>
</bean>

<!--
infoAnnouncer
A pipeline stage that logs any info metadata present,
but takes no action on them.
-->
<bean id="infoAnnouncer" parent="mda.StatusMetadataLoggingStage">
<property name="identificationStrategy" ref="identificationStrategy"/>
<property name="selectionRequirements">
<list>
<value>#{T(net.shibboleth.metadata.InfoStatus)}</value>
</list>
</property>
</bean>

<!--
warningAnnouncer
Expand Down
6 changes: 6 additions & 0 deletions mdx/uk/generate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,12 @@
p:registrationAuthorityDisplayNames-ref="registrationAuthorityDisplayNameMap"
/>

<!--
Output any INFO metadata we may have accumulated, such
as from discovery name deconfliction.
-->
<ref bean="infoAnnouncer"/>

<!--
*********************************************************
*** ***
Expand Down
22 changes: 22 additions & 0 deletions tools/mda-logging.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<charset>UTF-8</charset>
<Pattern>%-5level - %msg%n</Pattern>
</encoder>
</appender>

<!--
Based on the default quiet logging configuration, adding anything we
specifically want to see from lower levels than WARN.
-->

<logger name="net.shibboleth.metadata.pipeline.StatusMetadataLoggingStage" level="INFO"/>

<root level="WARN">
<appender-ref ref="CONSOLE"/>
</root>

</configuration>

0 comments on commit dbadbb4

Please sign in to comment.