Class: Tanker::Core::LogRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/tanker/core/log_record.rb

Constant Summary collapse

LEVEL_DEBUG =
1
LEVEL_INFO =
2
LEVEL_WARNING =
3
LEVEL_ERROR =
4

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(category, level, file, line, message) ⇒ LogRecord

Returns a new instance of LogRecord.



12
13
14
15
16
17
18
# File 'lib/tanker/core/log_record.rb', line 12

def initialize(category, level, file, line, message)
  @category = category
  @level = level
  @file = file
  @line = line
  @message = message
end

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



5
6
7
# File 'lib/tanker/core/log_record.rb', line 5

def category
  @category
end

#fileObject (readonly)

Returns the value of attribute file.



5
6
7
# File 'lib/tanker/core/log_record.rb', line 5

def file
  @file
end

#levelObject (readonly)

Returns the value of attribute level.



5
6
7
# File 'lib/tanker/core/log_record.rb', line 5

def level
  @level
end

#lineObject (readonly)

Returns the value of attribute line.



5
6
7
# File 'lib/tanker/core/log_record.rb', line 5

def line
  @line
end

#messageObject (readonly)

Returns the value of attribute message.



5
6
7
# File 'lib/tanker/core/log_record.rb', line 5

def message
  @message
end