Class: UCB::Rails::Security::Logger
- Inherits:
-
Logger
- Object
- Logger
- UCB::Rails::Security::Logger
- Defined in:
- lib/ucb_rails_security_logger.rb
Defined Under Namespace
Classes: Formatter
Instance Method Summary collapse
- #break ⇒ Object
- #format_message(severity, datetime, progrname, msg) ⇒ Object
-
#initialize(logdev, shift_age = 0, shift_size = 1048576) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(logdev, shift_age = 0, shift_size = 1048576) ⇒ Logger
Returns a new instance of Logger.
9 10 11 12 |
# File 'lib/ucb_rails_security_logger.rb', line 9 def initialize(logdev, shift_age = 0, shift_size = 1048576) @default_formatter = self.class::Formatter.new super end |
Instance Method Details
#break ⇒ Object
18 19 20 |
# File 'lib/ucb_rails_security_logger.rb', line 18 def break self << "\n" end |
#format_message(severity, datetime, progrname, msg) ⇒ Object
14 15 16 |
# File 'lib/ucb_rails_security_logger.rb', line 14 def (severity, datetime, progrname, msg) (@formatter || @default_formatter).call(severity, datetime, progname, msg) end |