Hello,
First of all, I would like to apologize if this is not the appropriate space for asking the question below. Unfortunately, me and my team couldn't find any specific forums or documentation regarding Chronicle Logger other than https://javadoc.io/doc/net.openhft/chronicle-logger/4.0.0/index.html (which has little to no description of configuration and usage).
How to properly configure Chronicle Logger for performance?
@hendrikebbers also had some trouble in configuring/using this logger, as stated in issue #130. One PR was sent out to fix this on his repo, but it is not really clear what changes made it faster, since there was only one commit.
The main parts of our pom.xml are:
<dependency>
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-logger-log4j-2</artifactId>
<version>4.26ea1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.14.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.14.1</version>
</dependency>
<!-- Other dependencies... -->
</dependencies>
<build>
<!-- Resources... -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>com.myproject.Main</mainClass>
<jvmArgsAppend>
<arg>--add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --illegal-access=permit --add-exports java.base/jdk.internal.ref=ALL-UNNAMED</arg>
</jvmArgsAppend>
</configuration>
</plugin>
</plugins>
</build>
Our Log4j's configuration file (log4j2.xml) is:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<File name="MainFileAppender" fileName="logs/mainlog.log">
<PatternLayout>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level- %msg%n</pattern>
</PatternLayout>
</File>
<Chronicle name="CHRONICLE">
<path>logs</path>
<chronicleCfg>
<blockSize>256</blockSize>
<bufferCapacity>512</bufferCapacity>
</chronicleCfg>
</Chronicle>
</Appenders>
<Loggers>
<Logger name="log4jlogger" level="DEBUG">
<appender-ref ref="MainFileAppender"/>
</Logger>
<Root level="DEBUG">
<AppenderRef ref="MainFileAppender"/>
</Root>
<Logger name="chronicle" level="trace" additivity="false">
<appender-ref ref="CHRONICLE"/>
</Logger>
</Loggers>
</Configuration>
Is there any documentation we could check to clarify this issue?
Hello,
First of all, I would like to apologize if this is not the appropriate space for asking the question below. Unfortunately, me and my team couldn't find any specific forums or documentation regarding Chronicle Logger other than https://javadoc.io/doc/net.openhft/chronicle-logger/4.0.0/index.html (which has little to no description of configuration and usage).
How to properly configure Chronicle Logger for performance?
@hendrikebbers also had some trouble in configuring/using this logger, as stated in issue #130. One PR was sent out to fix this on his repo, but it is not really clear what changes made it faster, since there was only one commit.
The main parts of our
pom.xmlare:Our Log4j's configuration file (
log4j2.xml) is:Is there any documentation we could check to clarify this issue?