[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] add a logging timestamp, and per-connection info



commit 9dea0c6c90dedc868dfaa84add2bfa19a2039281
Author: Ximin Luo <infinity0@xxxxxxxxxxxxxx>
Date:   Fri Mar 7 13:22:29 2014 +0000

    add a logging timestamp, and per-connection info
---
 proxy/flashproxy.js |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index 133266a..0ce3495 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -103,6 +103,8 @@ if (HEADLESS) {
 
 function puts(s) {
     if (DEBUG) {
+        s = new Date().toISOString() + " | " + s;
+
         /* This shows up in the Web Console in Firefox and F12 developer tools
            in Internet Explorer. */
         (console.debug || console.log).call(console, s);
@@ -711,6 +713,9 @@ function ProxyPair(client_addr, relay_addr, rate_limit) {
     var MAX_BUFFER = 10 * 1024 * 1024;
 
     function log(s) {
+        if (!SAFE_LOGGING) {
+            s = format_addr(client_addr) + '|' + format_addr(relay_addr) + ' : ' + s
+        }
         puts(s)
     }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits