I implemented Nifi ExecuteScript Processor with Python engine, I have pointed Property to my python file in ExecuteScript Processor.属性指向了我的 python 文件。 In my python code i have used log.error('Error') and log.info('Hello') of which i am able to see only log.error in nifi-app.log file and log.info are not showing.
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()
From Above code line #2 shows error in log file but line #1 is not getting logged
Please check the log level from /<nifi installation path>/conf/logback.xml
. I think your processor log level is warn
not info
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.