How to set the Log Level to SEVERE

568 views
Skip to first unread message

Venkat

unread,
Jun 14, 2011, 9:34:51 PM6/14/11
to Hazelcast
I am starting the Hazelcast server as follows:

Config config = new Config();
config.setConfigurationFile(new File("/var/lib/dmb/conf/
hazelcast.xml"));
HazelcastInstance instance = Hazelcast.newHazelcastInstance(config);

I would like to set the log level to SEVERE.
I tried as follows:
instance.getLoggingService().addLogListener(java.util.logging.Level.OFF,
new TestListener());

where TestListener implements com.hazelcast.logging.LogListener.
It didn't work, INFO messages still get logged.
Could you please let me know how to set the log level from INFO to
SEVERE.

Thanks
Venkat

Mehmet Dogan

unread,
Jun 15, 2011, 4:00:18 AM6/15/11
to haze...@googlegroups.com
First; config.setConfigurationFile is not working as you think, it is just a info attribute to see where that configuration is built from. Use 'config = new FileSystemXmlConfig(File configFile)' instead.

Hazelcast by default uses JDK logging, to configure you should use standard logging.properties file. LogListener api is to listen log events programmatically, not to configure logging itself.


@mmdogan





--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To post to this group, send email to haze...@googlegroups.com.
To unsubscribe from this group, send email to hazelcast+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hazelcast?hl=en.


Reply all
Reply to author
Forward
0 new messages