fixed logging and log uploading
This commit is contained in:
parent
d037c5f92e
commit
c28f5550a0
@ -9,7 +9,6 @@ swift_account = AUTH_7abbc116-8a07-4b63-819d-02715d3e0f31
|
||||
# lookback_hours = 120
|
||||
# lookback_window = 120
|
||||
# user = swift
|
||||
log_name = log-processor
|
||||
|
||||
[log-processor-access]
|
||||
# log_dir = /var/log/swift/
|
||||
|
@ -197,7 +197,7 @@ class LogProcessorDaemon(Daemon):
|
||||
def __init__(self, conf):
|
||||
c = conf.get('log-processor')
|
||||
super(LogProcessorDaemon, self).__init__(c)
|
||||
self.logger = get_logger(conf)
|
||||
self.logger = get_logger(c)
|
||||
self.log_processor = LogProcessor(conf, self.logger)
|
||||
self.lookback_hours = int(c.get('lookback_hours', '120'))
|
||||
self.lookback_window = int(c.get('lookback_window',
|
||||
|
@ -77,6 +77,10 @@ class LogUploader(Daemon):
|
||||
offset = base_offset + start
|
||||
if c == '%Y':
|
||||
year_offset = offset, offset+4
|
||||
# Add in the difference between len(%Y) and the expanded
|
||||
# version of %Y (????). This makes sure the codes after this
|
||||
# one will align properly in the final filename.
|
||||
base_offset += 2
|
||||
elif c == '%m':
|
||||
month_offset = offset, offset+2
|
||||
elif c == '%d':
|
||||
|
Loading…
x
Reference in New Issue
Block a user