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