[tor-bugs] #20540 [Metrics]: define log-levels for all java metrics-products

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 4 19:41:03 UTC 2017


#20540: define log-levels for all java metrics-products
-------------------------+------------------------------
 Reporter:  iwakeh       |          Owner:
     Type:  enhancement  |         Status:  needs_review
 Priority:  Medium       |      Milestone:
Component:  Metrics      |        Version:
 Severity:  Normal       |     Resolution:
 Keywords:               |  Actual Points:
Parent ID:               |         Points:
 Reviewer:               |        Sponsor:
-------------------------+------------------------------

Comment (by iwakeh):

 Replying to [comment:11 karsten]:
 > There, I think I made [https://gitweb.torproject.org/user/karsten
 /metrics-
 lib.git/commit/?h=task-20540&id=30113b528dcfca39b9ecc8179f195e9558dc428d
 all changes as suggested].
 >
 > And I changed that one log statement back to an
 `IllegalArgumentException`, even though I think that's a stretch.  (I
 believe that we should only throw `RuntimeException`s at callers for
 things they're clearly responsible for, like passing `null` to us where we
 clearly said that they must not do such a thing.  But the caller does not
 have exclusive control over the file system, so it might not have been
 them who created the non-directory file.  Yeah, a stretch, gray area, edge
 case...  I don't know the final answer yet.)
 >
 > Want to take another look?

 Looks fine!

 >
 > Should I continue with the other metrics-lib classes, like
 `DescriptorReaderImpl`?

 Sure.  This is a good approach, one by one.

 When there are more examples for the exception vs. logging for deriving a
 rule (of thumb), I'll add that to the wiki.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20540#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list