Skip to content

Commit

Permalink
Revert "cleanup logging"
Browse files Browse the repository at this point in the history
This reverts commit eed549b.
  • Loading branch information
howardt12345 committed Sep 17, 2024
1 parent eed549b commit 34ed353
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions modules/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
class Logging:
def __init__(self):
self.log_channel: discord.TextChannel = None
# self.log_file_path = None
self.log_file_path = None

def set_log_params(self, channel, log_file):
self.log_channel = channel
# self.log_file_path = log_file
self.log_file_path = log_file

async def log_to_channel(self, log_data: dict, color: discord.Color = None):
if not self.log_channel is None:
Expand All @@ -33,10 +33,9 @@ async def log_to_channel(self, log_data: dict, color: discord.Color = None):

def init(client: discord.Client, deployment_date: datetime):
log_channel = client.get_channel(int(os.getenv("LOG_CHANNEL")))
# filename = f"{str(deployment_date).split('.')[0].replace(':', '-')}.log"
# path = f"{sys.path[0]}/logs/{filename}"
# logging.set_log_params(log_channel, path)
logging.set_log_params(log_channel)
filename = f"{str(deployment_date).split('.')[0].replace(':', '-')}.log"
path = f"{sys.path[0]}/logs/{filename}"
logging.set_log_params(log_channel, path)


"""
Expand Down

0 comments on commit 34ed353

Please sign in to comment.