nifi.logs.level=INFO
确保bulletin板已经过滤并且没有其他消息正在占用。可以禁用bulletin板过滤器来检查它是否工作正常。
确保系统具有足够的内存和资源,以处理日志记录并在bulletin板上显示它们。
如果问题仍然存在,则可以检查NiFi日志文件。可能会有与日志记录和bulletin板相关的错误消息。
代码示例:
在代码中设置日志级别:
org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MyClass.class); logger.info("这是一个INFO日志记录");
在NiFi中启用bulletin板:
Properties properties = new Properties(); properties.setProperty("nifi.bulletin.board.component.name", "MyProcessor"); properties.setProperty("nifi.bulletin.board.level", "INFO"); BulletinRepository bulletinRepository = new VolatileBulletinRepository(); BulletinBoard bulletinBoard = new StandardBulletinBoard(bulletinRepository); MyProcessor processor = new MyProcessor(bulletinBoard); processor.initialize(new StandardProcessorInitializationContext(properties, null)); processor.onTrigger(context, session);
禁用bulletin板过滤器:
在bulletin板的设置中,将bulletin板过滤器禁用:
nifi.bulletin.board.filter.enabled=false