logger_json icon indicating copy to clipboard operation
logger_json copied to clipboard

Add ignored_metadata option

Open juliandicks opened this issue 2 years ago • 1 comments

Remembering to add metadata fields to the matadata list is problematic, so here is a version that allows you to rather have a black list of tags you don't want which are added to the existing black list.

config :logger_json, :backend,
       metadata: :all,
       ignored_metadata: [:domain, :erl_level],
       json_encoder: Jason,
       formatter: LoggerJSON.Formatters.BasicLogger

juliandicks avatar Jun 13 '23 02:06 juliandicks

I love this... Was just thinking about implementing this today.

aselder avatar Jun 27 '23 17:06 aselder

This was fixed in the recent releases of LoggerJSON in a slightly different way: https://github.com/Nebo15/logger_json/blob/master/lib/logger_json.ex#L55. Thank you for PR anyways and sorry for such a long reply!

AndrewDryga avatar Apr 12 '24 15:04 AndrewDryga