Class: NextStation::Logging::Subscribers::Base Private

Inherits:
Object
  • Object
show all
Defined in:
lib/next_station/logging/subscribers/base.rb

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

Direct Known Subclasses

Custom, Operation, Step

Constant Summary collapse

LEVELS =

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

Map levels to their numeric priority for comparison.

{
  debug: 0,
  info: 1,
  warn: 2,
  error: 3,
  fatal: 4,
  unknown: 5
}.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.subscribe(monitor) ⇒ Object

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.

Subscribes a new instance to the monitor.

Parameters:

  • monitor (Dry::Monitor::Notifications)


20
21
22
# File 'lib/next_station/logging/subscribers/base.rb', line 20

def self.subscribe(monitor)
  new.subscribe(monitor)
end

Instance Method Details

#subscribe(monitor) ⇒ Object

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.

Subscribes to the event(s) in the monitor.

Parameters:

  • monitor (Dry::Monitor::Notifications)

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/next_station/logging/subscribers/base.rb', line 26

def subscribe(monitor)
  raise NotImplementedError
end