x-cray / logrus-prefixed-formatter

Logrus Prefixed Log Formatter
MIT License
199 stars 107 forks source link

Custom prefix field name #36

Open Chamuelm opened 2 months ago

Chamuelm commented 2 months ago

Hi, We usually use a json formatter for our logs output but when debugging we found this formatter really nice. We want to add the prefix as part of the logger field which is supported currently only if the field name is "prefix", but we want to use something more descritive like "moduleName" or "operation".

I tought it might be nice to have the option to choose a custom log field name.

Chamuelm commented 2 months ago

I created a PR https://github.com/x-cray/logrus-prefixed-formatter/pull/37