LoggerJSON.JasonSafeFormatter.format

You're seeing just the function format, go back to LoggerJSON.JasonSafeFormatter module for more information.

Specs

format(any()) :: any()

Produces metadata that is "safe" for calling Jason.encode!/1 on without errors. This means that unexpected Logger metadata won't cause logging crashes.

Current formatting is...

  • Maps: as is
  • Printable binaries: as is
  • Numbers: as is
  • Structs that don't implement Jason.Encoder: converted to maps
  • Tuples: converted to lists
  • Keyword lists: converted to Maps
  • everything else: inspected