Module: Aliyun::Log

Extended by:
Log
Included in:
Log
Defined in:
lib/aliyun/log.rb,
lib/aliyun/version.rb,
lib/aliyun/log/utils.rb,
lib/aliyun/log/client.rb,
lib/aliyun/log/config.rb,
lib/aliyun/log/record.rb,
lib/aliyun/log/project.rb,
lib/aliyun/log/request.rb,
lib/aliyun/log/logstore.rb,
lib/aliyun/log/protobuf.rb,
lib/aliyun/log/protocol.rb,
lib/aliyun/log/record/field.rb,
lib/aliyun/log/server_error.rb,
lib/aliyun/log/common/logging.rb,
lib/aliyun/log/record/scoping.rb,
lib/aliyun/log/record/relation.rb,
lib/aliyun/log/record/exception.rb,
lib/aliyun/log/common/attr_struct.rb,
lib/aliyun/log/record/persistence.rb,
lib/aliyun/log/record/type_casting.rb,
lib/aliyun/log/record/scope_registry.rb

Defined Under Namespace

Modules: Common, PerThreadRegistry, Protobuf, Record, Utils Classes: Client, Config, Logstore, Project, Protocol, Request, ScopeRegistry, ServerError

Constant Summary collapse

VERSION =
'0.2.13'

Instance Method Summary collapse

Instance Method Details

#configureObject Also known as: config



19
20
21
# File 'lib/aliyun/log.rb', line 19

def configure
  block_given? ? yield(Config) : Config
end

#included_modelsObject



24
25
26
# File 'lib/aliyun/log.rb', line 24

def included_models
  @included_models ||= []
end

#init_logstoreObject



35
36
37
38
39
40
# File 'lib/aliyun/log.rb', line 35

def init_logstore
  @included_models.each do |model|
    model.create_logstore
    modle.sync_index
  end
end

#record_connectionObject



28
29
30
31
32
33
# File 'lib/aliyun/log.rb', line 28

def record_connection
  unless @record_connection
    @record_connection = Protocol.new(Config.new)
  end
  @record_connection
end