Class: AuthorizationLogger
- Inherits:
-
ActiveSupport::BufferedLogger
- Object
- ActiveSupport::BufferedLogger
- AuthorizationLogger
- Defined in:
- lib/role_based_authorization/authorization_logger.rb
Overview
Personalizes the authorization logging by adding Auth | in front of each line. It also outputs the time stamp and the severity of the log message.
Constant Summary collapse
- AUTHORIZATION_SYSTEM_LOG_MSG_PREFIX =
Prefix for each message
'Auth |'
Instance Method Summary collapse
-
#format_message(severity, timestamp, progname, msg) ⇒ Object
overriding of the formatting message.
Instance Method Details
#format_message(severity, timestamp, progname, msg) ⇒ Object
overriding of the formatting message
8 9 10 |
# File 'lib/role_based_authorization/authorization_logger.rb', line 8 def (severity, , progname, msg) "#{AUTHORIZATION_SYSTEM_LOG_MSG_PREFIX} #{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n" end |