Extract method
This commit is contained in:
@@ -4,7 +4,7 @@ require "mrsk/commands/base"
|
||||
class Mrsk::Commands::Auditor < Mrsk::Commands::Base
|
||||
def record(line)
|
||||
append \
|
||||
[ :echo, "'#{tags} #{line}'" ],
|
||||
[ :echo, tagged_line(line) ],
|
||||
audit_log_file
|
||||
end
|
||||
|
||||
@@ -17,6 +17,10 @@ class Mrsk::Commands::Auditor < Mrsk::Commands::Base
|
||||
"mrsk-#{config.service}-audit.log"
|
||||
end
|
||||
|
||||
def tagged_line(line)
|
||||
"'#{tags} #{line}'"
|
||||
end
|
||||
|
||||
def tags
|
||||
"[#{timestamp}] [#{performer}]"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user