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 96b9d86 commit bea7de6
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ def get_latest_game_server_log_file_path(log_directory : str = None) -> str:
return str(sorted_files[0][1])
else:
return None



#return {"game_server_log_file_path": log_directory}
pass

def get_latest_game_server_log_filepath_debug():
print("FROM_DEFAULT_LOG_DIRECTORY", get_latest_game_server_log_file_path("FROM_DEFAULT_LOG_DIRECTORY"))
Expand All @@ -53,7 +48,6 @@ 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}")
Expand All @@ -63,13 +57,10 @@ def get_latest_game_server_log_filepath_debug():
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





#print(get_latest_game_server_log_file_path())

0 comments on commit bea7de6

Please sign in to comment.