Richard,

I'll look into the logging stuff, definitely strange behavior. Are you
using ExecuteScript or InvokeScriptedProcessor? I noticed an
intermittent failure on InvokeScriptedProcessor in 1.20 [1] but maybe
it's present in more of the scripting stuff as they use the same
classes to handle the engines and scripts.

Regards,
Matt

[1] https://issues.apache.org/jira/browse/NIFI-11148

On Tue, Aug 22, 2023 at 7:19 AM Richard Beare <richard.be...@gmail.com> wrote:
>
> It seems stranger than I thought. I have the following in the callback:
>
>         log.info("Simple text")
>         log.info("Block size " + str(type(block_of_days)) + "\n")
>         log.info("Oldest time: " + oldest_time_str)
>         log.info("Newest time: " + newest_time_str)
>         log.info("Previous newest: " + 
> iso2str.format(previous_last_timestamp))
>
> The last 3 (from "Oldest time") and another later info message which is a 
> pure string appear in the log, but the first two don't.
>
>
> On Tue, Aug 22, 2023 at 8:36 PM Richard Beare <richard.be...@gmail.com> wrote:
>>
>> Hi all,
>> I'm having issues with logging from python. I have the processor set to 
>> debug level logging but I only see message from inside the callback;
>>
>> i.e
>>
>> flowFile = session.write(flowFile, PyStreamCallback())
>>
>> calls to log.error and log.info from inside the process method of 
>> PyStreamCallback() work fine.
>>
>> However calls to log.error, log.warn etc from inside the typical "if 
>> flowFile != None" block are not appearing as bulletins. They don't cause 
>> errors either. What am I missing?
>>
>> As an aside, I also seem to have trouble with changes to the script being 
>> registered - that seems intermittent.
>>
>> I'm using nifi 1.20
>>
>> Thanks

Reply via email to