[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #34061 [Applications/GetTor]: Reduce amount of GetTor logging
#34061: Reduce amount of GetTor logging
-------------------------------------+---------------------------
Reporter: cohosh | Owner: (none)
Type: defect | Status: new
Priority: Low | Milestone:
Component: Applications/GetTor | Version:
Severity: Normal | Keywords: easy, starter
Actual Points: | Parent ID:
Points: .5 | Reviewer:
Sponsor: |
-------------------------------------+---------------------------
We're logging at a very high level (looks like at debug), and outputting
frequent successes when we only really need to be logging errors.
For example: a successfully processed email in `log/email_parser.log`
outputs:
{{{
2020-04-27 23:18:53+0000 [-] Log opened.
2020-04-27 23:18:53+0000 [process email] New email request received.
2020-04-27 23:18:53+0000 [process email] Reading new email.
2020-04-27 23:18:53+0000 [-] Database query executed successfully.
2020-04-27 23:18:53+0000 [email parser] Building email message from
string.
2020-04-27 23:18:53+0000 [email parser] Normalizing and validating FROM
email address.
2020-04-27 23:18:53+0000 [email parser] Email address normalized and
validated.
2020-04-27 23:18:53+0000 [email parser] Request from [hid]
2020-04-27 23:18:53+0000 [email parser] Found request for links.
2020-04-27 23:18:53+0000 [-] Database query executed successfully.
2020-04-27 23:18:53+0000 [-] Main loop terminated.
2020-04-27 23:18:53+0000 [process email] Email request processed.
}}}
and in `log/gettor.log`:
{{{
2020-04-29T14:46:51+0000 [gettor#info] Getting links for windows is.
2020-04-29T14:46:51+0000 [-] Database query executed successfully.
2020-04-29T14:46:51+0000 [gettor#info] Sending links to [hid].
2020-04-29T14:46:51+0000 [gettor#debug] Creating plain text email
2020-04-29T14:46:51+0000 [gettor#debug] Calling asynchronous sendmail.
2020-04-29T14:46:51+0000 [twisted.mail.smtp.ESMTPSenderFactory#info]
Starting factory <twisted.mail.smtp.ESMTPSenderFactory object at
0x7f0bba74b780>
2020-04-29T14:46:51+0000 [gettor#info] Email sent successfully.
2020-04-29T14:46:51+0000 [twisted.mail.smtp.ESMTPSenderFactory#info]
Stopping factory <twisted.mail.smtp.ESMTPSenderFactory object at
0x7f0bba74b780>
2020-04-29T14:46:51+0000 [-] Database query executed successfully.
2020-04-29T14:46:51+0000 [-] Database query executed successfully.
}}}
We could reduce this to one log message at most. Especially since this
information *should* be captured in the stats database.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/34061>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs