mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Move sample data logger to own module
This commit is contained in:
8
lib/tasks/sample_data/logging.rb
Normal file
8
lib/tasks/sample_data/logging.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
module Logging
|
||||
private
|
||||
|
||||
def log(message)
|
||||
@logger ||= ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
|
||||
@logger.tagged("openfoodnetwork:sample_data:load") { @logger.info(message) }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user