[tor-bugs] #5069 [Obfsproxy]: obfsproxy log file has no timestamps

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Feb 10 11:38:05 UTC 2012


#5069: obfsproxy log file has no timestamps
-----------------------+----------------------------------------------------
 Reporter:  arma       |          Owner:  asn         
     Type:  defect     |         Status:  needs_review
 Priority:  normal     |      Milestone:              
Component:  Obfsproxy  |        Version:              
 Keywords:             |         Parent:              
   Points:             |   Actualpoints:              
-----------------------+----------------------------------------------------

Comment(by asn):

 Replying to [comment:4 karsten]:
 > Here's another patch to add a timestamp to the first log message.  I
 think the purpose of writing "Brand new obfsproxy log:" was to see if
 writing to the log file works.  I reduced that to writing a single newline
 and added a log message to say that obfsproxy started.  (I need the start
 time for the stats script to know when a 24-hour stats period starts.)

 The "Brand new obfsproxy log:" string was written as a delimiter to
 separate log instances from each other.

 I think that open() with the `O_WRONLY` flag
 (`open_and_set_obfsproxy_logfile()`) should fail if you have no write
 permissions for the file.

 I think we can remove the `write_logfile_prologue()` function in its
 entirety, and simply add a:
 `log_info("\nStarting.")` after setting the logging_method, like you did.
 How do you feel about this?

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


More information about the tor-bugs mailing list