[midPoint] Problems with logging configuration
Ivan Noris
ivan.noris at evolveum.com
Wed Apr 5 14:31:03 CEST 2017
Hi Pertti,
after midpoint loads System Configuration object, logging configuration
is applied from there. Maybe this is the problem.
Maybe this helps:
https://wiki.evolveum.com/display/midPoint/Initial+Logging+Setup+HOWTO
Regards,
Ivan
On 04/05/2017 02:08 PM, Pertti Kellomäki wrote:
>
> Hi all,
>
>
> I am configuring a custom audit logger that dumps some application
> specific data in addition to what midPoint logs out of the box. The
> Java classes were easy enough to implement, but I am having problems
> getting the logger log where I want it to.
>
>
> I want logging to start without administrator intervention at startup,
> so I took the logback.xml file from midPoint distribution and added
> the following:
>
>
> <appender name="KVH-AUDIT_LOG"
> class="ch.qos.logback.core.rolling.RollingFileAppender">
> <Append>true</Append>
> <File>${catalina.base}/logs/kvh-audit.log</File>
> <encoder>
> <pattern>%msg%n</pattern>
> </encoder>
> <rollingPolicy
> class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
>
> <fileNamePattern>${catalina.base}/logs/idm-profile-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
> <timeBasedFileNamingAndTriggeringPolicy
> class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
> <maxFileSize>100MB</maxFileSize>
> </timeBasedFileNamingAndTriggeringPolicy>
> <maxHistory>10</maxHistory>
> </rollingPolicy>
> </appender>
>
>
> <logger name="KVH-AUDIT" level="INFO">
> <appender-ref ref="KVH-AUDIT_LOG"/>
> </logger>
>
>
> Before tomcat is started, the midpoint.war archive is updated so that
> the original WEB-INF/classes/logback.xml is replaced by the modified
> file.
>
>
> When midPoint starts, I get log lines in kvh-audit.log as expected,
> but then I get the following in idm.log:
>
>
> 2017-04-05 10:49:43,414 [] [localhost-startStop-1] INFO
> (com.evolveum.midpoint.common.LoggingConfigurationManager): Applying
> logging configuration (version 0)
> 2017-04-05 10:49:43,417 [] [localhost-startStop-1] INFO
> (com.evolveum.midpoint.common.LoggingConfigurationManager): Resetting
> current logging configuration
> 2017-04-05 10:49:43,496 [] [localhost-startStop-1] INFO
> (com.evolveum.midpoint.common.LoggingConfigurationManager): New
> logging configuration applied
>
>
> After this, the KVH-AUDIT logger no longer appends to kvh-audit.log,
> even though the log lines continue to appear in idm.log. I
> don't understand where LoggingConfigurationManager finds the new
> logging configuration, and why it forgets the KVH-AUDIT_LOG appender
> but not the KVH-AUDIT logger.
>
>
> Tia, Pertti
>
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
--
Ivan Noris
Senior Identity Engineer
evolveum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170405/953debd2/attachment.htm>
More information about the midPoint
mailing list