Class: RedminePluginKit::Debug
- Inherits:
-
Object
- Object
- RedminePluginKit::Debug
- Defined in:
- lib/redmine_plugin_kit/debug.rb
Class Method Summary collapse
Class Method Details
.log(message = 'running') ⇒ Object
6 7 8 9 10 |
# File 'lib/redmine_plugin_kit/debug.rb', line 6 def log( = 'running') return if Rails.env.production? Rails.logger.debug { "#{Time.current.strftime '%H:%M:%S'} DEBUG [#{caller_locations(1..1).first.label}]: #{raw_msg }" } end |
.msg(message = 'running') ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/redmine_plugin_kit/debug.rb', line 12 def msg( = 'running') return if Rails.env.production? log puts raw_msg() # rubocop: disable Rails/Output true end |