[tor-bugs] #13386 [Core Tor/Tor]: "opening new log file" line goes to err-logfile despite being at loglevel notice

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Nov 12 21:22:33 UTC 2016


#13386: "opening new log file" line goes to err-logfile despite being at loglevel
notice
--------------------------+----------------------------------
 Reporter:  toralf        |          Owner:
     Type:  defect        |         Status:  new
 Priority:  Low           |      Milestone:  Tor: unspecified
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+----------------------------------

Comment (by atagar):

 I'm not a fan of changing the log line format but I'm not coming up with a
 better option. Making these lines special is a minor headache for parsers
 and things like the following...

 {{{
 % cut -d ' ' -f 4 ~/.tor/log | sort | uniq -c | sort -nr
   20803 [warn]
   13692 [notice]
    7832 [debug]
     135 [info]
      33 [err]
       2 /lib/i386-linux-
 gnu/libcrypto.so.1.0.0(OPENSSL_cleanse+0x32)[0xb723a5b2]
       2
       1 tor(+0x14826e)[0xb760b26e]
       1 died:
 }}}

 From the above we evidently already have multi-line log entries so kinda
 already crossed that bridge...

 {{{
 Jul 09 08:28:28.000 [notice] No circuits are opened. Relaxed timeout for
 circuit 4708 (a Testing circuit 3-hop circuit in state doing handshakes
 with channel state open) to 60000ms. However, it appears the circuit has
 timed out anyway. 2 guards are live. [23 similar message(s) suppressed in
 last 3600 seconds]

 ============================================================ T= 1468078946
 Tor 0.2.9.0-alpha-dev (git-44ea3dc3311564a9) died: Caught signal 11
 tor(+0x14826e)[0xb760b26e]
 /lib/i386-linux-gnu/libcrypto.so.1.0.0(OPENSSL_cleanse+0x32)[0xb723a5b2]
 /lib/i386-linux-gnu/libcrypto.so.1.0.0(OPENSSL_cleanse+0x32)[0xb723a5b2]
 }}}

 Options that have come up thus far seem to be...

 * Drop these lines. This is a no-go because we need some sentinel to
 indicate when logging starts for a new tor instance.
 * Change these lines to [err] (or whatever the log has). This doesn't make
 sense. For instance, if I have "Log bw file /var/log/tor/bw.log" would we
 log these as bandwidth events?
 * Use special lines as suggested above. Not great, but livable.
 * Leave this unfixed, sending the notice to all log files.

 Other ideas welcome but of the above either the special lines or leaving
 this unfixed have my vote. As sucky as these are the other options are
 even worse.

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


More information about the tor-bugs mailing list