travelping / hello

Erlang RPC server framework
MIT License
31 stars 20 forks source link

Add hidden_params for logging #59

Open surik opened 9 years ago

surik commented 9 years ago

This PR adds two options for logging:

1) logger_formatter: json | native How to print request and response in logs. json by default

2) hidden_params: [atom() | binary() | [atom() | binary()]] Which keys will be hidden. For example we have request like this:

{
 "key1": "value", 
 "key2":  {
     "key3": "value"
 },
 "key4":  {
     "key5": {
         "key6": "value"
     }
 }
}

and we want to hide key1 and key6, we should use hidden_params = [key1, [key4, key5, key6]]. [] by default

Relate to #58