Logging in HERE Anonymizer Self-Hosted

SLF4J

HERE Anonymizer Self-Hosted uses SLF4J for logging.

This is a standard way to implement logging in Java.

The SLF4J (Simple Logging Facade for Java) implements a simple abstraction
for different logging frameworks. It allows you to plug in your logging
framework of choice at deployment time.

Log4J

Log4J is a logging API for Java.

It implements the actual logging to the configured sink and interfaces with
different logging facades, for example SLF4J.

By default, Apache Flink uses Log4J, and so does HERE Anonymizer Self-Hosted
which is an Apache Flink application. You can configure Log4J
by passing the relevant configuration properties to the HERE Anonymizer Self-Hosted
application.

This is an example of a log4j-console.properties file. Note that
all parts are optional. If you don't provide any logging configuration, no logs
are created.

# This affects logging for both, Anonymization application and Flink
rootLogger.level = INFO
rootLogger.appenderRef.console.ref = ConsoleAppender
rootLogger.appenderRef.rolling.ref = RollingFileAppender

# Uncomment this if you want to change only Flink logging
# logger.flink.name = org.apache.flink
# logger.flink.level = INFO

# Uncomment this if you want to change only Anonymizer logging
# logger.anonymization.name = com.here.anonymization
# logger.anonymization.level = INFO

# Log all info to the console
appender.console.name = ConsoleAppender
appender.console.type = CONSOLE
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n

# Log all info in the given rolling file
appender.rolling.name = RollingFileAppender
appender.rolling.type = RollingFile
appender.rolling.append = false
appender.rolling.fileName = ${sys:log.file}
appender.rolling.filePattern = ${sys:log.file}.%i
appender.rolling.layout.type = PatternLayout
appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n
appender.rolling.policies.type = Policies
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size=100MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 10

# Suppress the irrelevant (wrong) warnings from the Netty channel handler
logger.netty.name = org.jboss.netty.channel.DefaultChannelPipeline
logger.netty.level = OFF