Class: SmartProxyDynflowCore::ReopenAppender

Inherits:
Logging::Appender
  • Object
show all
Defined in:
lib/smart_proxy_dynflow_core/log.rb

Instance Method Summary collapse

Constructor Details

#initialize(name, logger, opts = {}) ⇒ ReopenAppender

Returns a new instance of ReopenAppender.



5
6
7
8
9
# File 'lib/smart_proxy_dynflow_core/log.rb', line 5

def initialize(name, logger, opts = {})
  @reopen = false
  @logger = logger
  super(name, opts)
end

Instance Method Details

#append(_event) ⇒ Object



15
16
17
18
19
20
# File 'lib/smart_proxy_dynflow_core/log.rb', line 15

def append(_event)
  if @reopen
    Logging.reopen
    @reopen = false
  end
end

#set(status = true) ⇒ Object



11
12
13
# File 'lib/smart_proxy_dynflow_core/log.rb', line 11

def set(status = true)
  @reopen = status
end