mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Improve logging (#274)
* Add some custom log messages * Add original URL and remote IP to each log entry
This commit is contained in:
committed by
GitHub
parent
9c5553cc32
commit
1976e5ab3f
@@ -58,6 +58,8 @@ class ApplicationController < ActionController::Base
|
||||
private
|
||||
|
||||
def user_not_authorized
|
||||
logger.error { "User not authorized: #{user_signed_in? ? current_user.inspect : 'unlogged user'}" }
|
||||
|
||||
render json: {
|
||||
error: t('errors.unauthorized')
|
||||
}, status: :unauthorized
|
||||
|
||||
Reference in New Issue
Block a user