Public » MiniRedis Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

include timestamp in log

Changeset e5b3d2f39ae0

Parent b9c3c38c31f4

by Profile picture of Benjamin PollackBenjamin Pollack

Changes to one file · Browse files at e5b3d2f39ae0 Showing diff from parent b9c3c38c31f4 Diff from another changeset...

Change 1 of 2 Show Entire File miniredis.py Stacked
 
1
2
3
 
4
5
6
 
53
54
55
56
 
57
58
59
 
1
2
3
4
5
6
7
 
54
55
56
 
57
58
59
60
@@ -1,6 +1,7 @@
 #!/usr/bin/env python  # Copyright (C) 2010 Benjamin Pollack. All rights reserved.   +import datetime  import getopt  import os  import re @@ -53,7 +54,7 @@
  def log(self, client, s):   if self.logging:   who = '%s:%s' % client.socket.getpeername() if client else 'SERVER' - sys.stdout.write('%s: %s\n' % (who, s)) + sys.stdout.write('%s - %s: %s\n' % (datetime.datetime.now(), who, s))   sys.stdout.flush()     def select(self, client, db):