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 <[email protected]>
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
>