File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2323
2424BOT_TOKEN = "<your_bot_token>"
2525
26- logfile_dir_path = os .path .dirname (os .path .abspath (__file__ ))
27- logfile_abs_path = os .path .join (logfile_dir_path , "logs" , "bot.log" )
26+ logdir_path = os .path .dirname (os .path .abspath (__file__ ))
27+ logfile_path = os .path .join (logdir_path , "logs" , "bot.log" )
2828
29- if not os .path .exists (os .path .join (logfile_dir_path , "logs" )):
30- os .makedirs (os .path .join (logfile_dir_path , "logs" ))
29+ if not os .path .exists (os .path .join (logdir_path , "logs" )):
30+ os .makedirs (os .path .join (logdir_path , "logs" ))
3131
32- logfile_handler = logging .handlers .WatchedFileHandler (logfile_abs_path , 'a' , 'utf-8' )
32+ logfile_handler = logging .handlers .WatchedFileHandler (logfile_path , 'a' , 'utf-8' )
3333
3434logger = logging .getLogger (__name__ )
3535logging .basicConfig (format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' , level = logging .DEBUG , handlers = [logfile_handler ])
You can’t perform that action at this time.
0 commit comments