Skip to content

Commit

Permalink
fix: add idp script configuration logging patch
Browse files Browse the repository at this point in the history
  • Loading branch information
uprightech committed Sep 13, 2021
1 parent 943fece commit d4b6cac
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions static/src/main/patches/010.idp-script-logging-config.patch
@@ -0,0 +1,42 @@
diff -aurN shibboleth-idp.orig/conf/logback.xml shibboleth-idp/conf/logback.xml
--- shibboleth-idp.orig/conf/logback.xml 2021-07-27 14:07:26.000000000 +0100
+++ shibboleth-idp/conf/logback.xml 2021-09-13 10:21:42.055723529 +0100
@@ -170,7 +170,37 @@
<facility>AUTH</facility>
<suffixPattern>[%thread] %logger %msg</suffixPattern>
</appender>
-
+
+ <!-- script log destination -->
+ <appender name="IDP_SCRIPT" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <File>${idp.logfiles}/idp-script.log</File>
+
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <fileNamePattern>${idp.logfiles}/idp-script-%d{yyyy-MM-dd}.log.gz</fileNamePattern>
+ <maxHistory>${idp.loghistory}</maxHistory>
+ </rollingPolicy>
+
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <charset>UTF-8</charset>
+ <Pattern>%date{ISO8601} - %mdc{idp.remote_addr} - %level [%logger:%line] - %msg%n%ex{short}</Pattern>
+ </encoder>
+ </appender>
+
+ <!-- script loggers -->
+ <Logger name="org.gluu.service.custom.script" level="${idp.loglevel.root:-INFO}" additivity="false">
+ <appender-ref ref="IDP_SCRIPT" />
+ </Logger>
+
+ <Logger name="org.gluu.idp.script.service" level="${idp.loglevel.root:-INFO}" additivity="false">
+ <appender-ref ref="IDP_SCRIPT" />
+ </Logger>
+
+ <Logger name="org.gluu.service.PythonService" level="${idp.loglevel.root:-INFO}" additivity="false">
+ <appender-ref ref="IDP_SCRIPT" />
+ </Logger>
+
+ <!-- end script loggers -->
+
<logger name="Shibboleth-Audit" level="ALL">
<appender-ref ref="${idp.audit.appender:-IDP_AUDIT}"/>
</logger>

0 comments on commit d4b6cac

Please sign in to comment.