[tor-bugs] #23881 [Core Tor/Tor]: Implement a way to utilise tor's logging system from Rust code

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 10 16:28:53 UTC 2018


#23881: Implement a way to utilise tor's logging system from Rust code
-----------------------------------------------+---------------------------
 Reporter:  isis                               |          Owner:
                                               |  chelseakomlo
     Type:  enhancement                        |         Status:
                                               |  needs_review
 Priority:  High                               |      Milestone:  Tor:
                                               |  0.3.3.x-final
Component:  Core Tor/Tor                       |        Version:
 Severity:  Normal                             |     Resolution:
 Keywords:  rust, rust-pilot, review-group-28  |  Actual Points:
Parent ID:                                     |         Points:  3
 Reviewer:  nickm                              |        Sponsor:
-----------------------------------------------+---------------------------

Comment (by nickm):

 I added some comments to the merge request, but then apparently
 oniongit.eu decided to start giving me 500 errors.

 Here are the other questionsissues that I didn't enter into oniongit -- I
 hope that it comes back up again soon, and we can find the other
 questions/issues too.

 1) I'd recommend a rename on `rust_welcome_string()` to
 `rust_log_welcome_string()`: by convention, a function whose primary
 purpose is to _do_ something should have a verb name.

 2) Will the translate_* functions get inlined and compiled down to
 constants?  Logging is pretty critical-path.

 3) The C log functions exit fast, without formatting the message, if the
 log message isn't "interesting" because its severity is too low.  I think
 that if possible the Rust log macro should do the same, and avoid
 formatting messages when the function `log_message_is_interesting()`
 returns false.  That could be a separate commit, though.

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


More information about the tor-bugs mailing list