Update main.py

This commit is contained in:
Saifeddine ALOUI 2024-01-16 11:40:02 +01:00 committed by GitHub
parent 79be6dab41
commit 2c76aa166f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ def main():
writer.writeheader()
with open(log_file_path, mode='a', newline='') as csvfile:
fieldnames = ['time_stamp', 'user_name', 'ip_address']
fieldnames = ['time_stamp', 'user_name', 'ip_address', 'access', 'server']
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
row = {'time_stamp': str(datetime.datetime.now()), 'user_name': user, 'ip_address': ip_address, 'access': access, 'server': server}
writer.writerow(row)