Module: Bridgetown::Webfinger::Logging

Included in:
Builder, JRD, Link, Model
Defined in:
lib/bridgetown/webfinger/logging.rb

Overview

Helper methods for logging purposes

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

When including the module, also extend it as well

Parameters:

  • base (Module)

    the base module or class including the module

Since:

  • 0.1.0



15
16
17
18
# File 'lib/bridgetown/webfinger/logging.rb', line 15

def self.included(base)
  super
  base.extend(self)
end

Instance Method Details

#warn(msg) ⇒ void

This method returns an undefined value.

Sends a warning message through the Bridgetown logger

Examples:

Print a warning in the logger


extend Bridgetown::Webfinger::Logging
warn "I like some of you less than you deserve"

Parameters:

  • msg (String)

    the message to log

Since:

  • 0.1.0



32
33
34
35
# File 'lib/bridgetown/webfinger/logging.rb', line 32

def warn(msg)
  Bridgetown.logger.warn(msg)
  nil
end