[tor-bugs] #2914 [Tor]: Tor should truncate log file if loglevel < notice

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 2 19:50:34 UTC 2014


#2914: Tor should truncate log file if loglevel < notice
---------------------------+------------------------------
     Reporter:  mikeperry  |      Owner:
         Type:  defect     |     Status:  new
     Priority:  normal     |  Milestone:  Tor: unspecified
    Component:  Tor        |    Version:
   Resolution:             |   Keywords:  tor-relay easy
Actual Points:             |  Parent ID:
       Points:             |
---------------------------+------------------------------

Comment (by chobe):

 I thought this would be a good first issue for me to try and fix, even if
 it is never implemented.

 The above attached patch (submitted by me) truncates the log file when
 SafeLogging is disabled. It doesn't truncate the log file if the loglevel
 is less than notice (yet).

 I submitted this patch in order to learn more about tor and how to
 contribute to it. I looked over arlolra's fix to #5583 and tried to do a
 similar solution.

 You can test my patch by setting the SafeLogging and Log options in a
 torrc file and verifying that the correct values of SafeLogging will
 truncate the log file.

 I'd just like to know if I'm on the right track and if there's anything I
 missed. I believe my fix overlooks command line arguments given to tor and
 only accounts for options set in the torrc file.

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


More information about the tor-bugs mailing list