我实现了Nifi执行脚本处理器与Python引擎,我有指向脚本文件属性到我的python文件在执行脚本处理器.在我的python代码我使用log. error('错误')和log.info('你好')其中我能够看到只有log.error在nifi-app.log文件和log.info不显示。
flowFile = session.get()
if flowFile != None:
try:
log.info('Info >> Python processor started') #1
log.error('Python processor started') #2
applicationId = flowFile.getAttribute('http.param.applicationId')
flowFile = session.write(flowFile, ModJSON())
flowFile = session.putAttribute(flowFile, "filename",
flowFile.getAttribute('filename').split('.')[0] + '_translated_response.json')
flowFile = session.putAttribute(flowFile,"http.param.applicationId",applicationId)
session.transfer(flowFile, REL_SUCCESS)
log.error('Python processor completed')
except:
log.error('Error while sequencing ')
session.transfer(flowFile, REL_FAILURE)
session.commit()
从上面的代码行#2显示日志文件中的错误,但行#1没有被记录
请从/检查日志级别