mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Review fixes (#10641)
See comments in https://review.discourse.org/t/dev-imap-log-to-database-10435/14337/6 for context.
This commit is contained in:
@ -1,17 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ImapSyncLog < ActiveRecord::Base
|
||||
RETAIN_LOGS_DAYS = 5
|
||||
RETAIN_LOGS_DAYS ||= 5
|
||||
|
||||
belongs_to :group
|
||||
|
||||
def self.levels
|
||||
@levels ||= Enum.new(
|
||||
debug: 1,
|
||||
info: 2,
|
||||
warn: 3,
|
||||
error: 4
|
||||
)
|
||||
@levels ||= Enum.new(:debug, :info, :warn, :error)
|
||||
end
|
||||
|
||||
def self.log(message, level, group_id = nil)
|
||||
|
Reference in New Issue
Block a user