Module: OxyLogger

Defined in:
lib/oxy_logger.rb,
lib/oxy_logger/writer.rb,
lib/oxy_logger/version.rb,
lib/oxy_logger/formatter.rb,
lib/oxy_logger/log_record.rb

Defined Under Namespace

Modules: Formatter, Helper, Sys, Writer Classes: LogRecord

Constant Summary collapse

VERSION =
'0.3.0'

Class Method Summary collapse

Class Method Details

.config_oxy_hashHash

Note:

метод, возвращающий настройки всего приложения после инициализации

Returns OxyLogger.config_oxy_hash => :save_to_file_or_db=>“file”, :incoming_params=>true, :output_params=>true, :processing_time=>true, :date_time=>true, :called_method=>true, :class_name=>true.

Examples:

OxyLogger.config_oxy_hash

Returns:

  • (Hash)

    OxyLogger.config_oxy_hash => :save_to_file_or_db=>“file”, :incoming_params=>true, :output_params=>true, :processing_time=>true, :date_time=>true, :called_method=>true, :class_name=>true



72
73
74
75
76
77
78
# File 'lib/oxy_logger.rb', line 72

def self.config_oxy_hash
  {
    files_path: @@files_path,
    save_to: @@save_to,
    logget_fields: @@logget_fields
  }
end

.configure {|_self| ... } ⇒ Object

Конфигурирует сам себя

Yields:

  • (_self)

Yield Parameters:

  • _self (OxyLogger)

    the object that the method was called on



61
62
63
# File 'lib/oxy_logger.rb', line 61

def self.configure
  yield self    
end

.files_path=(value) ⇒ Object

Parameters:

  • value (String)
    • путь куда сохранять логи



37
38
39
# File 'lib/oxy_logger.rb', line 37

def self.files_path=(value)
  @@files_path = value
end

.logget_dataObject



52
53
54
# File 'lib/oxy_logger.rb', line 52

def self.logget_data
  @@logget_fields
end

.logget_fields=(value) ⇒ Object



48
49
50
# File 'lib/oxy_logger.rb', line 48

def self.logget_fields=(value)
  @@logget_fields = value    
end

.path_to_logObject



56
57
58
# File 'lib/oxy_logger.rb', line 56

def self.path_to_log
  @@files_path
end

.save_to=(value) ⇒ Object



43
44
45
# File 'lib/oxy_logger.rb', line 43

def self.save_to=(value)
  @@save_to = value
end