parent
88f5ac6d73
commit
81df52787c
@ -0,0 +1,19 @@ |
||||
defmodule APILogger do |
||||
@moduledoc """ |
||||
Logger of API ednpoins usage |
||||
""" |
||||
require Logger |
||||
|
||||
def log(conn) do |
||||
endpoint = |
||||
if conn.query_string do |
||||
"#{conn.request_path}?#{conn.query_string}" |
||||
else |
||||
conn.request_path |
||||
end |
||||
|
||||
Logger.debug(endpoint, |
||||
fetcher: :api |
||||
) |
||||
end |
||||
end |
Loading…
Reference in new issue