Commit 1bdcb55c authored by Matt Traudt's avatar Matt Traudt Committed by Matt Traudt
Browse files

Superficial log format changes

parent ac98dbce
......@@ -275,8 +275,8 @@ def _should_keep_result(did_request_maximum, result_time, download_times):
return True
# In all other cases, return false
log.debug('Not keeping result time %f.%s', result_time,
'' if not did_request_maximum else 'We requested the maximum '
'amount allowed')
'' if not did_request_maximum else ' We requested the maximum '
'amount allowed.')
return False
......@@ -48,8 +48,8 @@ def warn_if_not_accurate_enough(lines, constant):'The generated lines are within {:.5}% of what they should '
if accuracy_ratio < 1 - margin or accuracy_ratio > 1 + margin:
log.warning('There was {:.3f}% error and only +/- {:.3f}% is '
'allowed'.format((1-accuracy_ratio)*100, margin*100, 2))
log.warning('There was %f%% error and only +/- %f%% is '
'allowed', (1-accuracy_ratio)*100, margin*100)
def scale_lines(args, v3bw_lines):
......@@ -138,10 +138,9 @@ def main(args, conf):
if len(conf['server.passwords']) < 1:
conf_fname = os.path.join(, 'config.ini')
fail_hard('Sbws server needs at least one password in the section'
' [server.passwords] in the config file in {}. See '
'DEPLOY.rst for more information.'
fail_hard('Sbws server needs at least one password in the section '
'[server.passwords] in the config file in %s. See '
'DEPLOY.rst for more information.', conf_fname)
h = (conf['server']['bind_ip'], conf.getint('server', 'bind_port'))'Binding to %s:%d', *h)
......@@ -96,12 +96,11 @@ class RelayPrioritizer:
cutoff = max(int(len(relays) * PERCENT_TO_RETURN), MIN_TO_RETURN)
fn_tstop = Decimal(time_now())
fn_tdelta = (fn_tstop - fn_tstart) * 1000'Spent {0:.3f} msecs calculating relay best priority'.
format(fn_tdelta))'Spent %f msecs calculating relay best priority', fn_tdelta)
# Finally, slowly return the relays to the caller (after removing the
# priority member we polluted the variable with ...)
for relay in relays[0:cutoff]:
log.debug('Returning next relay %s with priority %f',
relay.nickname, round(relay.priority, 2))
relay.nickname, relay.priority)
yield relay
......@@ -397,7 +397,7 @@ class ResultDump:
nick = result.nickname
write_result_to_datadir(result, self.datadir)
log.debug(' %s %s finished measurement', fp, nick)
log.debug('%s %s finished measurement', fp, nick)
def results_for_relay(self, relay):
assert isinstance(relay, RouterStatusEntryV3)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment