Changeset 35:504f6f8bcf16 in livinglogic.python.tipimaid

Show
Ignore:
Timestamp:
12/02/08 19:18:53 (10 years ago)
Author:
Nikolas Tautenhahn <nik@…>
Parents:
34:49b76d528bc4 (diff), 33:6dbb6acccbba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Branch:
default
Message:

Merge

Files:
2 modified

Legend:

Unmodified
Added
Removed
  • liaalh.py

    r33 r35  
    2929        self.updateutcoffset() 
    3030        self.handlevirtualhost = "%v" in pattern 
    31         self.run = self.run_buffered if buffertime > 0 else self.run_unbuffered 
     31        if buffertime > 0: 
     32            self.run = self.run_buffered 
     33        else: 
     34            self.run = self.run_unbuffered 
    3235 
    3336    def openfile(self, filename): 
     
    143146    p.add_option("-z", "--gzip", dest="gzip", type="int", action="store", help="If set, logs are gzipped with this compression level (lowest: 1, highest: 9)", default=None) 
    144147    p.add_option("-b", "--buffertime", dest="buffertime", type="int", action="store", help="Time in seconds for which log entries are buffered, default=0. Set to 0 to disable buffering", default=0) 
    145     p.add_option("-u", "--utcrotate", dest="utcrotate", action="store_true", help="If set, UTC zime determines the time for filenames and rotation. Otherwise local time is used.", default=False) 
     148    p.add_option("-u", "--utcrotate", dest="utcrotate", action="store_true", help="If set, UTC time determines the time for filenames and rotation. Otherwise local time is used.", default=False) 
    146149    (options, args) = p.parse_args() 
    147150    if options.gzip is not None: 
  • liaalh.py

    r34 r35  
    6565 
    6666    def writeline(self, utclogdate, server, line): 
    67         if self.utcrotate: 
    68             filename = utclogdate.strftime(self.pattern) 
    69         else: 
    70             filename = (utclogdate + self.localutcoffset).strftime(self.pattern) 
     67        if not self.utcrotate: 
     68            utclogdate += self.localutcoffset 
     69        filename = utclogdate.strftime(self.pattern) 
    7170        if self.handlevirtualhost: 
    7271            filename = filename.replace("%v", server)