Module: RGFA::LoggerSupport
- Included in:
- RGFA
- Defined in:
- lib/rgfa/logger.rb
Overview
Progress logging related-methods for RGFA class
Instance Method Summary collapse
-
#enable_progress_logging(part: 0.1, channel: STDERR) ⇒ RGFA
Activate logging of progress.
-
#progress_log(symbol, progress = 1, **keyargs) ⇒ RGFA
private
Updates progress logging for a computation.
-
#progress_log_end(symbol, **keyargs) ⇒ RGFA
private
Completes progress logging for a computation.
-
#progress_log_init(symbol, units, total, initmsg = nil) ⇒ RGFA
private
Initialize progress logging for a computation.
Instance Method Details
#enable_progress_logging(part: 0.1, channel: STDERR) ⇒ RGFA
Activate logging of progress
162 163 164 165 166 |
# File 'lib/rgfa/logger.rb', line 162 def enable_progress_logging(part: 0.1, channel: STDERR) @progress = RGFA::Logger.new(channel: channel) @progress.enable_progress(part: part) return self end |
#progress_log(symbol, progress = 1, **keyargs) ⇒ RGFA
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.
Updates progress logging for a computation
179 180 181 182 |
# File 'lib/rgfa/logger.rb', line 179 def progress_log(symbol, progress=1, **keyargs) @progress.progress_log(symbol, progress) if @progress return self end |
#progress_log_end(symbol, **keyargs) ⇒ RGFA
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.
Completes progress logging for a computation
187 188 189 190 |
# File 'lib/rgfa/logger.rb', line 187 def progress_log_end(symbol, **keyargs) @progress.progress_end(symbol) if @progress return self end |
#progress_log_init(symbol, units, total, initmsg = nil) ⇒ RGFA
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.
Initialize progress logging for a computation
171 172 173 174 |
# File 'lib/rgfa/logger.rb', line 171 def progress_log_init(symbol, units, total, initmsg = nil) @progress.progress_init(symbol, units, total, initmsg) if @progress return self end |