来自 Ignite 的重复日志记录
Duplicate logging from Ignite
我在 Dropwizard 应用程序中使用 Apache Ignite,似乎无法让 Ignite 仅通过 slf4j 登录。 Dropwizard 附带 jul-to-slf4j bridge and installs 应用启动前的所有桥接。
我已经按照 instructions 设置了日志记录,但最终还是出现了重复的日志:
IgniteConfiguration cfg = new IgniteConfiguration();
IgniteLogger log = new Slf4jLogger();
cfg.setGridLogger(log);
Ignite ignite = Ignition.start(cfg);
控制台输出如下:
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]
输出中的第一行看起来像是通过了 slf4j,然后带有时间戳的行看起来像是来自 JUL。是否有其他方法可以禁用来自 JUL 的内容?
我遇到了完全相同的问题。确保将 IGNITE_QUIET
环境变量设置为 false。根据documentation:"Note that all output in quiet mode is done through standard output (STDOUT)."
您可以在命令行上执行此操作,或调用
System.setProperty(org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET, "false");
在调用 Ignition.start()
之前。
我在 Dropwizard 应用程序中使用 Apache Ignite,似乎无法让 Ignite 仅通过 slf4j 登录。 Dropwizard 附带 jul-to-slf4j bridge and installs 应用启动前的所有桥接。
我已经按照 instructions 设置了日志记录,但最终还是出现了重复的日志:
IgniteConfiguration cfg = new IgniteConfiguration();
IgniteLogger log = new Slf4jLogger();
cfg.setGridLogger(log);
Ignite ignite = Ignition.start(cfg);
控制台输出如下:
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]
输出中的第一行看起来像是通过了 slf4j,然后带有时间戳的行看起来像是来自 JUL。是否有其他方法可以禁用来自 JUL 的内容?
我遇到了完全相同的问题。确保将 IGNITE_QUIET
环境变量设置为 false。根据documentation:"Note that all output in quiet mode is done through standard output (STDOUT)."
您可以在命令行上执行此操作,或调用
System.setProperty(org.apache.ignite.IgniteSystemProperties.IGNITE_QUIET, "false");
在调用 Ignition.start()
之前。