State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:497096|
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.txt2) 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
We're sorry to hear that
Please tell us why