invenia / Memento.jl

A flexible logging library for Julia
https://invenia.github.io/Memento.jl/latest
Other
87 stars 14 forks source link

Register parents #160

Closed rofinn closed 4 years ago

rofinn commented 4 years ago

In some cases, you may end up registering a nested logger without the parent being registered. In these cases, we should autoregister the parent if it doesn't exist... otherwise it can lead to confusing behaviour.

rofinn commented 4 years ago

This came up while debugging #159 where the Main logger on the REPL wasn't registered, but the inner Example logger was. I suppose Memento._logger should just be a tree at some point to ensure that parents exist, but that seemed like more work.

codecov[bot] commented 4 years ago

Codecov Report

Merging #160 into master will increase coverage by 0.01%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #160      +/-   ##
==========================================
+ Coverage   96.97%   96.99%   +0.01%     
==========================================
  Files          12       12              
  Lines         331      333       +2     
==========================================
+ Hits          321      323       +2     
  Misses         10       10              
Impacted Files Coverage Δ
src/loggers.jl 99.09% <100.00%> (+0.01%) :arrow_up:

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 fa94fea...9c95f57. Read the comment docs.