Module: MatrixSdk

Defined in:
lib/matrix_sdk.rb,
lib/matrix_sdk/api.rb,
lib/matrix_sdk/mxid.rb,
lib/matrix_sdk/room.rb,
lib/matrix_sdk/user.rb,
lib/matrix_sdk/client.rb,
lib/matrix_sdk/errors.rb,
lib/matrix_sdk/version.rb,
lib/matrix_sdk/response.rb,
lib/matrix_sdk/util/events.rb,
lib/matrix_sdk/util/extensions.rb

Defined Under Namespace

Modules: Extensions, Logging, Protocols, Response, Rooms, Util Classes: Api, Client, ErrorEvent, Event, EventHandlerArray, MXID, MatrixConflictError, MatrixConnectionError, MatrixError, MatrixEvent, MatrixForbiddenError, MatrixNotAuthorizedError, MatrixNotFoundError, MatrixRequestError, MatrixTimeoutError, MatrixTooManyRequestsError, MatrixUnexpectedResponseError, Room, User

Constant Summary collapse

VERSION =
'2.3.0'

Class Method Summary collapse

Class Method Details

.debug!Object



45
46
47
# File 'lib/matrix_sdk.rb', line 45

def self.debug!
  logger.level = :debug
end

.global_logger?Boolean

Returns:

  • (Boolean)


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

def self.global_logger?
  @global_logger ||= false
end

.loggerObject



49
50
51
52
53
54
# File 'lib/matrix_sdk.rb', line 49

def self.logger
  @logger ||= ::Logging.logger[self].tap do |logger|
    logger.add_appenders ::Logging.appenders.stdout
    logger.level = :info
  end
end

.logger=(global_logger) ⇒ Object



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

def self.logger=(global_logger)
  @logger = global_logger
  @global_logger = !global_logger.nil?
end