Logging in controller, model and view