Module: CemAcpt::LoggingAsync
- Included in:
- RSpecUtils::Command, TestRunner::Runner
- Defined in:
- lib/cem_acpt/logging.rb
Class Method Summary collapse
- .async_debug(message, prefix = nil) ⇒ Object
- .async_error(message, prefix = nil) ⇒ Object
- .async_fatal(message, prefix = nil) ⇒ Object
- .async_info(message, prefix = nil) ⇒ Object
- .async_warn(message, prefix = nil) ⇒ Object
-
.included(base) ⇒ Object
Provides class method wrappers for logging methods.
- .log_write_thread ⇒ Object
Instance Method Summary collapse
- #async_debug(message, prefix = nil) ⇒ Object
- #async_error(message, prefix = nil) ⇒ Object
- #async_fatal(message, prefix = nil) ⇒ Object
- #async_info(message, prefix = nil) ⇒ Object
- #async_warn(message, prefix = nil) ⇒ Object
- #log_write_thread ⇒ Object
Class Method Details
.async_debug(message, prefix = nil) ⇒ Object
272 273 274 275 |
# File 'lib/cem_acpt/logging.rb', line 272 def async_debug(, prefix = nil) msg = prefix.nil? || prefix.empty? ? : "#{prefix} #{}" CemAcpt::Logging.logger.debug(msg) end |
.async_error(message, prefix = nil) ⇒ Object
287 288 289 290 |
# File 'lib/cem_acpt/logging.rb', line 287 def async_error(, prefix = nil) msg = prefix.nil? || prefix.empty? ? : "#{prefix} #{}" CemAcpt::Logging.logger.error(msg) end |
.async_fatal(message, prefix = nil) ⇒ Object
292 293 294 295 |
# File 'lib/cem_acpt/logging.rb', line 292 def async_fatal(, prefix = nil) msg = prefix.nil? || prefix.empty? ? : "#{prefix} #{}" CemAcpt::Logging.logger.fatal(msg) end |
.async_info(message, prefix = nil) ⇒ Object
277 278 279 280 |
# File 'lib/cem_acpt/logging.rb', line 277 def async_info(, prefix = nil) msg = prefix.nil? || prefix.empty? ? : "#{prefix} #{}" CemAcpt::Logging.logger.info(msg) end |
.async_warn(message, prefix = nil) ⇒ Object
282 283 284 285 |
# File 'lib/cem_acpt/logging.rb', line 282 def async_warn(, prefix = nil) msg = prefix.nil? || prefix.empty? ? : "#{prefix} #{}" CemAcpt::Logging.logger.warn(msg) end |
.included(base) ⇒ Object
Provides class method wrappers for logging methods
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/cem_acpt/logging.rb', line 299 def self.included(base) class << base def log_write_thread CemAcpt::LoggingAsync.log_write_thread end def async_debug(, prefix = nil) CemAcpt::LoggingAsync.async_debug(, prefix) end def async_info(, prefix = nil) CemAcpt::LoggingAsync.async_info(, prefix) end def async_warn(, prefix = nil) CemAcpt::LoggingAsync.async_warn(, prefix) end def async_error(, prefix = nil) CemAcpt::LoggingAsync.async_error(, prefix) end def async_fatal(, prefix = nil) CemAcpt::LoggingAsync.async_fatal(, prefix) end end end |
.log_write_thread ⇒ Object
268 269 270 |
# File 'lib/cem_acpt/logging.rb', line 268 def log_write_thread @log_write_thread ||= Concurrent::SingleThreadExecutor.new end |
Instance Method Details
#async_debug(message, prefix = nil) ⇒ Object
331 332 333 |
# File 'lib/cem_acpt/logging.rb', line 331 def async_debug(, prefix = nil) CemAcpt::LoggingAsync.async_debug(, prefix) end |
#async_error(message, prefix = nil) ⇒ Object
343 344 345 |
# File 'lib/cem_acpt/logging.rb', line 343 def async_error(, prefix = nil) CemAcpt::LoggingAsync.async_error(, prefix) end |
#async_fatal(message, prefix = nil) ⇒ Object
347 348 349 |
# File 'lib/cem_acpt/logging.rb', line 347 def async_fatal(, prefix = nil) CemAcpt::LoggingAsync.async_fatal(, prefix) end |
#async_info(message, prefix = nil) ⇒ Object
335 336 337 |
# File 'lib/cem_acpt/logging.rb', line 335 def async_info(, prefix = nil) CemAcpt::LoggingAsync.async_info(, prefix) end |
#async_warn(message, prefix = nil) ⇒ Object
339 340 341 |
# File 'lib/cem_acpt/logging.rb', line 339 def async_warn(, prefix = nil) CemAcpt::LoggingAsync.async_warn(, prefix) end |
#log_write_thread ⇒ Object
327 328 329 |
# File 'lib/cem_acpt/logging.rb', line 327 def log_write_thread CemAcpt::LoggingAsync.log_write_thread end |