Notify log to separate files?

Is there a way to make the notify system log errors to separate files? I want to log shader sub system to separate “shader.errors.log” instead of the default output stream. Is there a way to do this from python?

No. We designed the high-level Notify API to allow this, should we ever decide we needed to implement it, but the low-level implementation doesn’t actually support this at the moment. All notify messages go to the same stream.

David

In one of my applications, I use Python’s logging module for a rotating file logger. I haven’t had any issues using it with Panda. My guess is you could create two logger instances with different output streams with no issue.

import logging
import logging.handlers

LOG_FILENAME = 'logs/My_Log_File.txt'
myLogger = logging.getLogger("MyLogger")
myLogger.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s - [%(filename)s] - %(message)s")
handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=524288, backupCount=5)
handler.setFormatter(formatter)
myLogger.addHandler(handler)

myLogger.info("This will be written to log file")

I’m making just:

sys.stdout = open(path + "report.log", "w")
sys.stderr = open(path + "errors.log", "w")

But yes… actually Panda mixes ‘out’ and ‘err’ (most messages goes to ‘out’). Would be nice to fix it someday.