Reputation: 6950
Here is my Hazelcast deployment procedure in two steps:
1) Download the Hazelcast jar at:
https://repo1.maven.org/maven2/com/hazelcast/hazelcast-all/$HAZELCAST_VERSION/hazelcast-all-$HAZELCAST_VERSION.jar
2) Deploy Hazelcast using the command:
java -server $JAVA_OPTS com.hazelcast.core.server.StartServer
Without deviating much from the described procedure, it there a way to set the log level?
More specifically what I'm looking for is something like adding a flag similar to -Djava.util.logging.level=WARN to filter out the info logs, but I have been unsuccessful so far.
I'm trying to avoid using alternative log libraries and xml configuration files for this purpose.
Thank you for your attention
Upvotes: 1
Views: 2327
Reputation: 1294
Hazelcast provides multiple ways you can configure the logger. This may be helpful.
Using JVM parameter: java -Dhazelcast.logging.type=log4j
Using System class: System.setProperty( "hazelcast.logging.type", "log4j" );
and in the log4j, add the following.
<logger name="com.hazelcast">
<level value="warn" />
</logger>
Upvotes: 1
Reputation: 3257
I believe it's more like a logging config question, rather than Hazelcast. java.util.logging
, like other logging frameworks, uses a config file, which you can point using java.util.logging.config.file
param. Or you create a LogManager
and point it with java.util.logging.config.class
param.
Hazelcast doesn't have any internal logging library, just uses java.utl.logging
. To configure it, you need to look that logging framework's config options.
Upvotes: 0