Commit 414fc9db authored by b5n's avatar b5n

Update lumber.py

parent dc0f6414
......@@ -16,11 +16,11 @@ LOGFILE = get_config()
def http_dec(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
http()
http_watch()
return func(*args, **kwargs)
return wrapper
def http():
def http_watch():
http_client.HTTPConnection.debuglevel = 1
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
......@@ -44,7 +44,7 @@ def recycle_log():
line_count = len(lines)
if line_count > 3000:
open(LOGFILE, 'w').writelines(lines[303:])
message = ' ##### !!!!! ##### !!!!! #####' + LOGFILE + ' TRUNCATED'
message = ' ##### !!!!! ##### !!!!! #####' + LOGFILE + ' RECYCLED'
log_exception(message)
print(message)
except Exception as ex:
......
Markdown is supported
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