Spatial Logging

The logback.xml file allows you to control on logging behavior, such as sending output to a log file instead of by default sending it to the console which redirects to the spectrum-server.log. You can also set the log level to turn off logging altogether or log only fatal errors, for example.

Default logback file


<?xml version="1.0" encoding="UTF-8"?>
<!-- =================================================================================== -->
<!-- Logger configuration for remote components                                          -->
<!--                                                                                     -->
<!-- log to console, redirected to Platform log (server\logs\spectrum-server.log) -->
<!-- log to files, redirected to (server\modules\spatial\spatial.XXX.log)                -->
<!--                                                                                     -->
<!-- for general information about the configuration file, check out the logback manual  -->
<!-- at                                  -->
<!-- =================================================================================== -->
	<appender name="CONSOLE-SPATIAL" class="ch.qos.logback.core.ConsoleAppender">
			<pattern>[Spatial] - [%thread] %-5level %logger{35} - %msg%n</pattern>
	<!--appender name="FILE-SPATIAL" class="ch.qos.logback.core.rolling.RollingFileAppender">
			<pattern>%d [%thread] %-5level %logger{35} - %msg%n</pattern>
		<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
	<!-- Level: OFF, ERROR, WARN, INFO, DEBUG -->
	<logger name="com.mapinfo.midev" level="INFO" additivity="false">
		<appender-ref ref="CONSOLE-SPATIAL"/>
		<!-- appender-ref ref="FILE-SPATIAL"/ -->

Option Values
  • OFF–turn off logging
  • ERROR–log runtime or unexpected errors
  • WARN–log warnings only; for example, using a deprecated API
  • INFO–log runtime events such as startup or shutdown [default]
  • DEBUG–log detailed debugging information
  • CONSOLE-SPATIAL –sends log information to the console [default]
  • FILE-SPATIAL–sends log information to a log file based on component (no longer applicable - Spatial has a single remote component)