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: Bot, 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.8.0'

Class Method Summary collapse

Class Method Details

.debug!Object



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

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

.global_logger?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'lib/matrix_sdk.rb', line 72

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

.loggerObject



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

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



67
68
69
70
# File 'lib/matrix_sdk.rb', line 67

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