I am running my pyramid application as systemd service.
sudo systemctl restart my_pyramid_app
I have added code as per this link to redirect my logs to a production.log file.
Now recently I have added some print commands for printing out the exception messages in my application. But I don't see any of these print commands being printed to production.log file.
I have checked the logs using below command as well, but didn't see my logs there either.
journalctl -u s4m_pyramid -S "1 week ago"
Here is my code for print commands. It is sitting in __init__.py
file
@notfound_view_config()
def notfound(exc,request):
print("Not found view!!!")
print(request.exception)
return redirect(url('/contents/error'))
@exception_view_config()
def error_view(exc,request):
print("Exception view!!!")
print(request.exception)
return redirect(url('/contents/error'))
Any ideas where are my print command going