Enable DEBUG logging within the modern UI

Managed by | Updated .

Warning

DEBUG logging should only be enabled while debugging is required as it results in large amounts of data being written to the modern ui.log

There is a global setting that controls the log level used by the Modern UI.

In some instances it can be beneficial to increase this log level to assist with debugging.

This setting can only be changed by an administrator with back-end access to the server, and it affects the server globally.

Funnelback v15+

Edit $SEARCH_HOME/web/conf/modernui/log4j2.xml. Towards the end where the <Logger> are defined, add a few more <Logger>s:

$SEARCH_HOME/web/conf/modernui/log4j2.xml
<Loggers>
  <Root level="warn">
    <AppenderRef ref="ModernUILog"/>
  </Root>
  <Logger name="com.funnelback" level="info"/>
 
  [...]
 
  <!-- To display the raw XML packet from PADRE -->
  <Logger name="com.funnelback.publicui.search.lifecycle.data.fetchers.padre.AbstractPadreForking" level="trace" />
 
  <!-- Additional logging for the single sign-on / Modern UI authentication -->
  <Logger name="waffle" level="trace" />
 
  [...]
</Loggers>

Changes to this file are reloaded every 30s, so no Jetty restart is required.

Additional TRACE logs should appear in the Modern UI log $SEARCH_HOME/web/logs/modernui.(Admin|Public).log

Funnelback v14.2.x and below

To enable DEBUG logging:

1. Edit the file $SEARCH_HOME/web/conf/modernui/log4j.properties and amend the log4j.logger.com.funnelback line. From

$SEARCH_HOME/web/conf/modernui/log4j.properties
# Loggers
log4j.rootLogger=WARN, modernui_log
log4j.logger.com.funnelback=INFO
# Appenders
log4j.appender.modernui_log=org.apache.log4j.RollingFileAppender
log4j.appender.modernui_log.File=${funnelback.installdir}/web/logs/modernui.log
log4j.appender.modernui_log.MaxFileSize=1024KB
log4j.appender.modernui_log.MaxBackupIndex=5
log4j.appender.modernui_log.layout=org.apache.log4j.PatternLayout
log4j.appender.modernui_log.layout.ConversionPattern=%d [%t] %-5p %c{2} %x - %m%n

to:

$SEARCH_HOME/web/conf/modernui/log4j.properties
# Loggers
log4j.rootLogger=WARN, modernui_log
#log4j.logger.com.funnelback=INFO
log4j.logger.com.funnelback=DEBUG
# Additional padre debug logging:
log4j.logger.com.funnelback.publicui.search.lifecycle.data.fetchers.padre.exec.JavaPadreForker=DEBUG
# Additional logging to debug single sign on authentication - use if you need to debug modern UI authentication
log4j.logger.waffle=TRACE
# Appenders
log4j.appender.modernui_log=org.apache.log4j.RollingFileAppender
log4j.appender.modernui_log.File=${funnelback.installdir}/web/logs/modernui.log
log4j.appender.modernui_log.MaxFileSize=1024KB
log4j.appender.modernui_log.MaxBackupIndex=5
log4j.appender.modernui_log.layout=org.apache.log4j.PatternLayout
log4j.appender.modernui_log.layout.ConversionPattern=%d [%t] %-5p %c{2} %x - %m%n

The additional padre debugging line is optional and provides additional log lines relating to the padre execution.

2. Restart the funnelback-jetty-webservice service (requires root/sudo access)

  • Under linux execute /etc/init.d/funnelback-jetty-webserver restart
  • Under Windows restart the funnelback-jetty-webserver service from the service control panel.

Jetty can take a few minutes to restart.

Additional DEBUG logging should now appear in the modern UI log ($SEARCH_HOME/web/logs/modernui.log)

Was this artcle helpful?

Tags
Type: Keywords:
Features:
XML
Frontend > Modern UI Frontend > Freemarker Frontend > Hook scripts

Comments