aserafin / grape_logging

Request logging for Grape!
MIT License
147 stars 76 forks source link

Privacity protection on logging #5

Closed diguliu closed 8 years ago

diguliu commented 9 years ago

This code allows the declaration of special fields (such as passwords) to be obfuscatd from the logging. Here is an usage example:

use GrapeLogging::Middleware::RequestLogger, { logger: logger, obfuscated_params: ['password'] }
aserafin commented 9 years ago

Thanks for the great idea! I would like to make it easy for people that use grape mounted inside rails to leverage the Rails.application.config.filter_parameters. What do you think about extracting filtering code to separate method so it can be easily overwritten or sth similar?

diguliu commented 9 years ago

I think it's a good idea. It was my first solution, but than I tried to solve the problem without too many changes.

aserafin commented 9 years ago

Sure! Do you feel like modifying your pull request? In case not I would implement it myself soonish :)

diguliu commented 9 years ago

I'll try to asaic!

diguliu commented 9 years ago

@aserafin There! See if that's what you had in mind.

dmitry commented 9 years ago

@aserafin would be nice to merge it.

aceunreal commented 9 years ago

Could this please be merged?

aserafin commented 9 years ago

@aceunreal I'm looking at the other pull request by @987poiuytrewq which has this change included. I hope I will be done with it by the end of the week

dmitry commented 9 years ago

Just to mention: https://github.com/aserafin/grape_logging/pull/9

jhirn commented 9 years ago

+1 Needed....

aserafin commented 8 years ago

@diguliu thanks for contributing - feature got included in separate pr (#16)

diguliu commented 8 years ago

Cool @aserafin! ;)