Search code examples
log4j2prestotrino

How to make Trino(prev. presto) to log in JSON format


Looking for solution to make Trino logs(worker and coordinator) in JSON format, tried to replace log4j jars with log4j2 or logback with appropriate configuration, but neither worked, from DOCKER file:

RUN tar  --exclude="*log4j*.jar"  --directory /opt/ -xzf /opt/presto-server-${PRESTO_VERSION}.tar.gz
COPY log4j/*.jar /opt/presto/lib/

Any input is appreciated.


Solution

  • Add log.format=json to the server configuration file.