ID 497096 - When using Python's logger.info command, the output is directed to the stderr stream not stdout

Follow

Problem summary
When using Python's logger.info command, the output is directed to the stderr stream not stdout

Customer reported version
nuke.13.1v1

Customer reported platform
centos7

Steps to reproduce

1) Open Nuke with the following command, changing for a valid path if needed:

Nuke13.1 1> C:\temp\stdout.txt 2> C:\temp\stderr.txt
2) In the Script Editor, run the following code:
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter("||%(name)s | %(levelname)s || %(message)s")
log_handler = logging.StreamHandler()
log_handler.setLevel(logging.DEBUG)
log_handler.setFormatter(formatter)
logger.addHandler(log_handler)
logger.info("Test Logging info")
3) Check the stdout.txt and stderr.txt files, the output will goto the stderr.txt file, not stdout.txt

Expected behaviour
For all non-error outputs to be output to the stdout stream

Actual behaviour
Nuke's launch output or print commands in the init.py get added to stdout, however everything else gets output to the stderr stream.


Workaround
Unknown.

Reproduced by support
This bug has been reproduced in:
Nuke 13.1v1 - Windows 10, CentOS 7, macOS Big Sur
Nuke 12.0v1 - Windows 10, CentOS 7
Nuke 9.0v1 - Windows 10, macOS Big Sur

Earliest version tested
Nuke 9.0v1 - This issue appears to be in all versions of the product

    We're sorry to hear that

    Please tell us why