latchset / custodia

An API to manage secrets storage and retrieval
GNU General Public License v3.0
85 stars 27 forks source link

Add more logging calls to explain 403 errors #165

Closed raildo closed 7 years ago

raildo commented 7 years ago

We should improve our logging message specially when this messages are related to errors.

Signed-off-by: Raildo Mascena rmascena@redhat.com Closes: #154

codecov-io commented 7 years ago

Codecov Report

Merging #165 into master will decrease coverage by 0.05%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #165      +/-   ##
==========================================
- Coverage    60.5%   60.44%   -0.06%     
==========================================
  Files          36       36              
  Lines        3099     3102       +3     
  Branches      339      339              
==========================================
  Hits         1875     1875              
- Misses       1134     1137       +3     
  Partials       90       90
Impacted Files Coverage Δ
custodia/secrets.py 76.6% <0%> (-0.88%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d7c1ef7...5118e0c. Read the comment docs.

simo5 commented 7 years ago

Are we sure we want to log these messages at error level ... or would debug be more appropriate ?

raildo commented 7 years ago

My mistake, I'll use the debug level for this operations.

tiran commented 7 years ago

I tried your patch and found out that we have a bug in the plugin code. [global] debug = true does not set debug plugins into debug mode. As a consequence, it does not enable debug logging of plugins. _create_plugin() should set debug=True if debugging is enabled globally.

raildo commented 7 years ago

This code https://github.com/latchset/custodia/blob/master/custodia/plugin.py#L268-L273 is not enough for enable the debug mode? Apparently this code get the config file to verify the debug mode. I'll investigate deeper which is the exactly behavior for debug mode here.