[tor-bugs] #1668 [Tor Relay]: Make log granularity configurable

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Nov 8 16:52:28 UTC 2010


#1668: Make log granularity configurable
-------------------------+--------------------------------------------------
 Reporter:  nickm        |       Owner:                   
     Type:  enhancement  |      Status:  needs_review     
 Priority:  trivial      |   Milestone:  Tor: post 0.2.2.x
Component:  Tor Relay    |     Version:                   
 Keywords:  easy         |      Parent:                   
-------------------------+--------------------------------------------------

Comment(by karsten):

 Replying to [comment:7 nickm]:
 > Looks good.  A couple of things to change/think about:
 >
 >   * Instead of rejecting a value that doesn't divide into 1 second, can
 we round to the nearest divisor of 1 second and warn?

 Sure. I changed the code so that we pick the next higher valid divisor or
 multiple: 3 msec -> 4 msec, 126 msec -> 200 msec, 1001 msec -> 2000 msec.
 We're still rejecting negative values, though.

 >   * Actually, there are only 15 divisors of 1 second that you can
 express as an integer number of msec.  Is this too restrictive?  Too
 permissive?  Is there any good reason for anyone to set something bigger
 than 1msec but smaller than 1sec?

 Hard to say. My idea was to be as permissive as possible. But things went
 ugly (and probably unexpected for the user) when allowing 400 msec or
 something.

 >   * The code should document that the option only controls the
 granularity written by Tor to a file or console log.  It does not (for
 example) "batch up" log messages to  affect times logged by a controller,
 times attached to syslog messages, or the mtime fields on log files.  I
 think this is okay, but we should document it so nobody gets surprised.

 Right. I added a comment like yours to the man page.

 See updated branch loggranularity in my public repository.

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


More information about the tor-bugs mailing list