Skip to content

Commit

Permalink
Update Webserver_game_server_log_reader.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BoQsc committed Aug 9, 2024
1 parent e6cfedb commit 96b9d86
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,23 @@ def get_latest_game_server_log_filepath_debug():

if __name__ == "__main__":


# Monitor log file, polling algorithm, detect if new log file appeared.
last_file = get_latest_game_server_log_file_path()
print(f"Starting monitor. Latest file: {last_file}")

import time
while True:
time.sleep(5)
current_file = get_latest_game_server_log_file_path()
# Process log file

if current_file != last_file:
print(f"New log file detected: {current_file}")
last_file = current_file


# Monitor log file, polling algorithm, detect if new log file appeared.
# Process log file



#print(get_latest_game_server_log_file_path())

0 comments on commit 96b9d86

Please sign in to comment.