Skip to content

Commit

Permalink
fix: fix unknown type
Browse files Browse the repository at this point in the history
  • Loading branch information
c4710n committed Oct 23, 2023
1 parent 04d2167 commit 4b85d8a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/cozy_logger/formats/json.ex
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ defmodule CozyLogger.JSON do

alias Logger.Formatter

@spec format(atom, term, Logger.Formatter.time(), keyword()) :: IO.chardata()
@type date :: {1970..10_000, 1..12, 1..31}
@type time_ms :: {0..23, 0..59, 0..59, 0..999}
@type date_time_ms :: {date, time_ms}

@spec format(atom, term, date_time_ms, keyword) :: IO.chardata()
def format(level, message, timestamp, metadata) do
build_base_attrs(level, message, timestamp)
|> append_source_location(metadata)
Expand Down

0 comments on commit 4b85d8a

Please sign in to comment.