Lawrence Shaban
02/07/2023, 7:32 PMhandlers:
console:
class: logging.StreamHandler
level: DEBUG
formatter: simple
stream: <ext://sys.stdout>
import logging
logger = logging.getLogger(__name__)
def example_node(input):
logger.debug(input)
output = input + 1
return output
I might be just doing something simple wrong but any help be appreciated! It works for info, so just using that for now but would be good to have the option of debug! 🙂Antony Milne
02/07/2023, 9:12 PMloggers
section of your logging.yml file? Chances are that you need to change the level
there.Lawrence Shaban
02/07/2023, 9:19 PMAntony Milne
02/08/2023, 8:31 AMhandlers
section (the thing you posted above which includes console
) and the loggers
section further down the file. Just changing the level of a handler
won’t show the messages unless the logger
itself has the level set appropriately. See https://docs.python.org/3/howto/logging.html#logging-flow - the message doesn’t even reach the handler if the logger stops it first 🙂rich
in your logging.yml file? This is generally what people use now rather than the plain console logging. It will give you pretty colours and other nice things compared to plain console text.