Class: Rails::Pretty::Logger::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/pretty/logger/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



6
7
8
9
10
11
12
# File 'lib/rails/pretty/logger/configuration.rb', line 6

def initialize
  @authenticate_with = nil
  @log_line_parser = nil
  @read_only = Rails.env.production?
  @max_file_size = nil
  @tail_lines = 500
end

Instance Attribute Details

#authenticate_withObject

Returns the value of attribute authenticate_with.



3
4
5
# File 'lib/rails/pretty/logger/configuration.rb', line 3

def authenticate_with
  @authenticate_with
end

#log_line_parserObject

Returns the value of attribute log_line_parser.



3
4
5
# File 'lib/rails/pretty/logger/configuration.rb', line 3

def log_line_parser
  @log_line_parser
end

#max_file_sizeObject

Returns the value of attribute max_file_size.



3
4
5
# File 'lib/rails/pretty/logger/configuration.rb', line 3

def max_file_size
  @max_file_size
end

#read_only=(value) ⇒ Object (writeonly)

Sets the attribute read_only

Parameters:

  • value

    the value to set the attribute read_only to.



4
5
6
# File 'lib/rails/pretty/logger/configuration.rb', line 4

def read_only=(value)
  @read_only = value
end

#tail_linesObject

Returns the value of attribute tail_lines.



3
4
5
# File 'lib/rails/pretty/logger/configuration.rb', line 3

def tail_lines
  @tail_lines
end

Instance Method Details

#read_only?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/rails/pretty/logger/configuration.rb', line 14

def read_only?
  @read_only == true
end