Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to hide custom fields in text formatter #1202

Closed
ale-rinaldi opened this issue Nov 19, 2020 · 4 comments · May be fixed by #1203
Closed

Allow to hide custom fields in text formatter #1202

ale-rinaldi opened this issue Nov 19, 2020 · 4 comments · May be fixed by #1203
Assignees
Labels

Comments

@ale-rinaldi
Copy link

Hello,

I'm using logrus with the evalphobia/logrus_sentry middleware to both log errors to the console and send them to Sentry.

The middleware allows to specify certain fields that have a special meaning on Sentry, such as the full HTTP request object. However, passing those fields to the logrus.WithFields() function causes them to also display on the terminal, that is not what one may want: if you put it the entire web request, it actually becomes hard to read.

So, I'm passing the fields just to have them passed on to Sentry, but I don't want them to display on the terminal.

I thought about a HideCustomFields boolean option in the TextFormatter, that solves this use case without breaking any interface.

Thanks

@informationtr
Copy link

Merhaba,

Evalphobia/logrus_sentry ara yazılımıyla logrus'u hem hataları konsola kaydetmek hem de Sentry'ye göndermek için kullanıyorum.

Ara yazılım, tam HTTP istek nesnesi gibi Sentry'de özel bir anlamı olan belirli alanları belirlemeye izin verir. Ancak, bu alanları logrus.WithFields() işlevine geçirmek, bunların terminalde de görüntülenmesine neden olur, isteyebileceği şey bu değildir: tüm web isteğini koyarsanız, aslında okunması zorlaşır.

Bu yüzden, alanları sadece Sentry'ye iletmeleri için geçiyorum ama onların terminalde görüntülenmesini istemiyorum.

TextFormatter'da bu kullanım durumunu herhangi bir arayüzü bozmadan çözen bir HideCustomFields boole seçeneği düşündüm.

teşekkürler

hadi bakalımmm

@github-actions
Copy link

github-actions bot commented Oct 2, 2021

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 2, 2021
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@ale-rinaldi
Copy link
Author

@informationtr is there any chance this will be reconsidered? We're still keeping a separate fork for this. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants