2

I'm using Apache Ignite within a Dropwizard app and can't seem to get Ignite to only log through slf4j. Dropwizard comes with the jul-to-slf4j bridge and installs all the bridges prior to app startup.

I've followed the instructions for setting up logging, but still end up with duplicate logs:

IgniteConfiguration cfg = new IgniteConfiguration();
IgniteLogger log = new Slf4jLogger();
cfg.setGridLogger(log);
Ignite ignite = Ignition.start(cfg);

Here's the console output:

INFO  main o.a.i.i.IgniteKernal: 

>>>    __________  ________________  
>>>   /  _/ ___/ |/ /  _/_  __/ __/  
>>>  _/ // (7 7    // /  / / / _/    
>>> /___/\___/_/|_/___/ /_/ /___/   
>>> 
>>> ver. 2.3.0#20171028-sha1:8add7fd5
>>> 2017 Copyright(C) Apache Software Foundation
>>> 
>>> Ignite documentation: http://ignite.apache.org

[10:34:32]    __________  ________________ 
[10:34:32]   /  _/ ___/ |/ /  _/_  __/ __/ 
[10:34:32]  _/ // (7 7    // /  / / / _/   
[10:34:32] /___/\___/_/|_/___/ /_/ /___/  
[10:34:32] 
[10:34:32] ver. 2.3.0#20171028-sha1:8add7fd5
[10:34:32] 2017 Copyright(C) Apache Software Foundation
[10:34:32] 
[10:34:32] Ignite documentation: http://ignite.apache.org
[10:34:32] 
[10:34:32] Quiet mode.
[10:34:32]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[10:34:32] 

The first lines in the output look like they went through slf4j and then the timestamped ones look like they're coming from JUL. Is there some other way to disable what's coming from JUL?

Tristan
  • 1,077
  • 11
  • 16
  • Could you please share your JUL config? Also, what is the backing implementation for the SLF4J? – Stanislav Lukyanov Feb 24 '18 at 13:41
  • I don't have a JUL config setup since I thought it would all go through slf4j. What should I be using there? Dropwizard uses Logback fro the slf4j implementation. – Tristan Feb 26 '18 at 14:47
  • I tried to reproduce that but I can't. Any chance you could create a minimal reproducer and share it on github? Preferably without other frameworks, just the Ignite and loggers. – Stanislav Lukyanov Feb 27 '18 at 11:53

1 Answers1

2

I had this exact same issue. Make sure you set the IGNITE_QUIET environment variable to false. According to the documentation: "Note that all output in quiet mode is done through standard output (STDOUT)."

You can either do this on the command line, or call

System.setProperty(org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET, "false");

Before the call to Ignition.start().

Kevin Jin
  • 1,536
  • 4
  • 18
  • 20
  • This was the fix! I read that in the documentation, but I obviously didn't connect the dots. Thank you! – Tristan Mar 02 '18 at 20:24