parent
35f99c849f
commit
fa664e6663
|
|
@ -5,8 +5,10 @@ import threading
|
|||
from telegram.ext import Updater
|
||||
import os
|
||||
|
||||
with open('log.txt', 'r+') as f:
|
||||
f.truncate(0)
|
||||
|
||||
if os.path.exists('log.txt'):
|
||||
with open('log.txt', 'r+') as f:
|
||||
f.truncate(0)
|
||||
|
||||
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||
handlers=[logging.FileHandler('log.txt'), logging.StreamHandler()],
|
||||
|
|
|
|||
Loading…
Reference in New Issue