Module: ADAL::Logging
- Included in:
- AuthenticationParameters, Authority, CacheDriver, ErrorResponse, MemoryCache, MexResponse, SelfSignedJwtFactory, SuccessResponse, TokenRequest, TokenResponse, UserCredential, WSTrustRequest, WSTrustResponse
- Defined in:
- lib/adal/logging.rb
Overview
Mix-in module for the ADAL logger. To obtain a logger in class methods the calling class will need to extend this module. To obtain a logger in instance methods the calling will need to include this Module.
Constant Summary collapse
- DEFAULT_LOG_LEVEL =
Logger::ERROR
- DEFAULT_LOG_OUTPUT =
STDOUT
Class Attribute Summary collapse
-
.correlation_id ⇒ Object
Returns the value of attribute correlation_id.
-
.log_level ⇒ Object
Returns the value of attribute log_level.
-
.log_output ⇒ Object
Returns the value of attribute log_output.
Instance Method Summary collapse
-
#logger ⇒ Object
Creates one ADAL logger per calling class/module with a specified output.
Class Attribute Details
.correlation_id ⇒ Object
Returns the value of attribute correlation_id.
42 43 44 |
# File 'lib/adal/logging.rb', line 42 def correlation_id @correlation_id end |
.log_level ⇒ Object
Returns the value of attribute log_level.
43 44 45 |
# File 'lib/adal/logging.rb', line 43 def log_level @log_level end |
.log_output ⇒ Object
Returns the value of attribute log_output.
44 45 46 |
# File 'lib/adal/logging.rb', line 44 def log_output @log_output end |
Instance Method Details
#logger ⇒ Object
92 93 94 95 96 |
# File 'lib/adal/logging.rb', line 92 def logger @logger ||= ADAL::Logger.new(Logging.log_output, Logging.correlation_id) @logger.level = Logging.log_level || DEFAULT_LOG_LEVEL @logger end |