Logger.Formatter.format

You're seeing just the function format, go back to Logger.Formatter module for more information.
Link to this function

format(config, level, msg, timestamp, metadata)

View Source

Specs

format(
  {atom(), atom()} | [pattern() | binary()],
  Logger.level(),
  Logger.message(),
  time(),
  keyword()
) :: IO.chardata()

Takes a compiled format and injects the level, timestamp, message, and metadata keyword list and returns a properly formatted string.

Examples

iex> pattern = Logger.Formatter.compile("[$level] $message")
iex> timestamp = {{1977, 01, 28}, {13, 29, 00, 000}}
iex> formatted = Logger.Formatter.format(pattern, :info, "hello", timestamp, [])
iex> IO.chardata_to_string(formatted)
"[info] hello"