You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
358 B
16 lines
358 B
6 years ago
|
module LoggerHelper
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
extend LoggerHelper
|
||
|
|
||
|
|
||
|
# 以用户id开始的日志定义
|
||
|
def uid_logger(message)
|
||
|
Rails.logger.info("##:#{current_user.try(:id)} --#{message}")
|
||
|
end
|
||
|
|
||
|
# 以用户id开始的日志定义
|
||
|
def uid_logger_error(message)
|
||
|
Rails.logger.error("##:#{current_user.try(:id)} --#{message}")
|
||
|
end
|
||
|
end
|