#5584: Raise awareness of safer logging
------------------------------------------------------+---------------------
 Reporter:  bastik                                    |          Owner:         
         
     Type:  enhancement                               |         Status:  new    
         
 Priority:  normal                                    |      Milestone:  Tor: 
unspecified
Component:  Tor                                       |        Version:  Tor: 
unspecified
 Keywords:  easy hack awareness of logging tor-relay  |         Parent:         
         
   Points:                                            |   Actualpoints:         
         
------------------------------------------------------+---------------------

Comment(by nickm):

 yeah, I agree that a new callback would be necessary.

 As another issue: logging the second message at "info" is incorrect; we
 should log it whenever we log anything at info, but the message itself is
 semantically a warning (since it tells the user about a potentially
 problematic situation.  Also, whether we should complain about SafeLogging
 is logically independent from whether we should warn about the log level.

 Fortunately, there's an easy solution: just rewrite the logic to be:
 {{{
     if (get_options()->SafeLogging_ != SAFELOG_SCRUB_ALL) {
       log_warn(...);
     }
     if (get_min_log_level() >= LOG_INFO) {
        log_warn(...);
 }}}

 (Though I might have gotten the direction of that >= comparison wrong.)

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5584#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Reply via email to