Forums

Long-running process (launched from the scheduler) is not logging info to a log file.

As successful elsewhere, I’ve tried setting the logger as:

logging.basicConfig(filename='/home/username/home/project/logname.log', level=logging.INFO,
                    stream=sys.stderr,
                    format='%(asctime)s %(levelname)-8s %(message)s',
                    datefmt='%Y-%m-%d %H:%M:%S')  # level=logging.DEBUG

I’ve also tried without stream=sys.stderr and with level=logging.WARNING and level=logging.ERROR

I assume a different path may be needed, but not sure what that would be.

Things are printing in my account's error/access/server logs, but not directly from my logger.

Not sure if it will be necessary, but I’ve tried to pip install daiquiri [1] (after launching a console in my virtual environment), but it says access denied

[1] — https://www.pythonanywhere.com/forums/topic/11752/

See my reply to the other time you posted this.

Sorry about that. I posted the question initially on someone else's older post, but it said 'Queued for Moderation,' which I had never seen, so I thought there may be a wait that wouldn't exist for a new topic.