reorg logging
moved logging to views.py