[英]Nifi ExecuteScript Processor with Python engine not logging info
我用 Python 引擎實現了 Nifi ExecuteScript 處理器,我在 ExecuteScript 處理器中將腳本文件屬性指向了我的 python 文件。 在我的 python 代碼中,我使用了 log.error('Error') 和 log.info('Hello') 其中我只能看到 nifi-app.log 文件中的 log.error 並且 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 行沒有被記錄
請檢查/<nifi installation path>/conf/logback.xml
的日志級別。 我認為您的處理器日志級別是warn
不是info
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.