The file "log4j2.xml" located in your /<indexima_install_folder>/galactica/conf folder is used to configure the Indexima logs.

It is recommended to use the template present in the indexima installer package.


<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="30">
		<Property name="LOG_PATTERN">%d{yyyy-MM-dd_HH:mm:ss} %5p [%t] %c - %m%n</Property>
		<!-- Default appender in console. Only STDOUT -->
		<Console name="ConsoleAppender" target="SYSTEM_OUT">
			<PatternLayout pattern="${LOG_PATTERN}"/>

		<!-- File appender with 100MB / day. The  property log4j2.logFolder is set into galactica -->
		<RollingFile name="FileAppender" fileName="${sys:log4j2.logFolder}/indexima_current.log"
					 filePattern="${sys:log4j2.logFolder}/indexima_%d{yyyy-MM-dd}.log" append="true" createOnDemand="true">
			<PatternLayout pattern="${LOG_PATTERN}" />
				<TimeBasedTriggeringPolicy interval="1" />
				<SizeBasedTriggeringPolicy size="100 MB"/>
			<DefaultRolloverStrategy max="2" compressionLevel="0">
				<!-- old files deleted hen age > 7 days -->
				<Delete basePath="${sys:log4j2.logFolder}" >
         	 		<IfLastModified age="7d" />
					<IfFileName glob="indexima_*.log" />
		<!-- Create an async appender for logs file -->
		<Async name="AsyncFileAppender">
			<AppenderRef ref="FileAppender"/>
		<!-- Create an async appender for console logs -->
		<Async name="AsyncConsoleAppender">
			<AppenderRef ref="ConsoleAppender"/>
		<!-- Default configuration -->
		<Root level="INFO">
			<AppenderRef ref="AsyncFileAppender"/>
		<!-- Default configuration -->
		<Logger name="org.apache.commons.jcs" level="WARN" additivity="false">
			<AppenderRef ref="AsyncFileAppender"/>
		<!-- Yarn launcher goes to console. -->
		 <Logger name="io.galactica.yarn" level="INFO" additivity="false">
			<AppenderRef ref="AsyncConsoleAppender"/>
		<!-- Console Logger. Do not change. -->
		<Logger name="INDEXIMA_CONSOLE" level="INFO" additivity="false">
			<AppenderRef ref="AsyncConsoleAppender"/>
		<!-- Monitoring Logger. Do not change. -->
		<Logger name="INDEXIMA_MONITOR" level="INFO" additivity="false">
			<AppenderRef ref="AsyncConsoleAppender"/>

Base configuration

This will write logs in a file located in the folder specified by the property log.dir in the galactica.conf configuration file.

The current log file is named indexima_current.log.

Every day, it rotates the file to a new one, and save the previous file with the corresponding date.

Log History

The property <IfLastModified age= allows you to change the default maximum log history. Default is 7 days.


5 loggers are configured.

Root logger

This is the base logger, logging 90% of the events in Galactica. It is recommended to keep it on level=INFO. If you need a more detailed log for a specific reason, you can change it to DEBUG. If you do this, don't forget to put it back to INFO once you found what you are looking for.

Apache JCS

An additional logger for common modules by Apache.


Yarn logs if you use YARN deployment.

Indexima Console

Logs related to Indexima Console. By default, it is written on the terminal.

Indexima Monitoring

Logs related to Indexima SQL queries. All queries sent to Indexima are logged. By default, it is written on the terminal.

To go further

If you want to customize your logging experience, please refer to the official Apache documentation: