Class: UCB::Rails::Security::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/ucb_rails_security_logger.rb

Defined Under Namespace

Classes: Formatter

Instance Method Summary collapse

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

#breakObject



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 format_message(severity, datetime, progrname, msg)
  (@formatter || @default_formatter).call(severity, datetime, progname, msg)
end