Changeset 25:1b19a61c0141 in livinglogic.python.tipimaid
- Timestamp:
- 11/27/08 16:46:32 (10 years ago)
- Author:
- Nikolas Tautenhahn <nik@…>
- Branch:
- default
- Message:
-
removed debug
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
r24
|
r25
|
|
16 | 16 | |
17 | 17 | class Buffer(object): |
18 | | def __init__(self, pattern='', gzip_logs=None, buffertime=5, stream=sys.stdin, debug=False): |
| 18 | def __init__(self, pattern='', gzip_logs=None, buffertime=5, stream=sys.stdin): |
19 | 19 | self.pattern = pattern |
20 | 20 | self.gzip_logs = gzip_logs |
… |
… |
|
26 | 26 | if gzip_logs is not None and not pattern.endswith(".gz"): |
27 | 27 | self.pattern = "%s.gz" % self.pattern |
28 | | self.debug = debug |
29 | 28 | self.handlevirtualhost = "%v" in pattern |
30 | 29 | |
31 | 30 | def add(self, logline): |
32 | | if self.debug: |
33 | | debugfile = open("/tmp/liaalh_debug.log", "a") |
34 | | debugfile.write("%s: %r\n" % (datetime.datetime.now().isoformat(), logline)) |
35 | | debugfile.close() |
36 | 31 | if not self.data or self.data[-1] <= logline: |
37 | 32 | self.data.append(logline) |