Conversation
|
@extrabacon -- is this PR helpful? I have a process which exits with exitcode=0, but still emits |
|
@surfaceowl I'm closing this PR - it does not fix anything. The expected behavior is described in the readme:
The PR changes the logic so that it only initializes the error depending on the exit code, but then how would the user find out what was written to stderr? The error event is emitted in both cases - it is up to the user to decide how to handle it. If you want can put in code that ignores the error if the exitcode is equal to 0. Or fix it on the python side. # logging.py
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
# all logs write to stderr by default
logger.info("yo")
logger.warning("warn")
logger.error("error")
logger.critical("oh noes!")PythonShell.run('logging.py', function (err, results) {
console.log(err)
// if desired we can ignore logs if err.exitCode == 0
});Hopefully that helps :) I'm curious - are you using python-shell for your surfaceOwl buisiness, or some other thing? |
|
@extrabacon -- thanks for your quick reply. I'll look into fixing the problem on the python side that is generating the warnings first. If it turns out my case is like the tensorflow situation in python-shell issue #113 , then I'll look at dropping those warnings or perhaps just redirecting warnings to stdout for visibility. re: python-shell and surfaceOwl -- yes, we are using this |
No description provided.