-
Notifications
You must be signed in to change notification settings - Fork 8
Improve logger and debug #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I checked it, and it was great, but I had a misunderstanding about why sometimes state.world_model.stopped_cycle was 0 and other times it was 55. It would be great if you could explain this to me. |
directory = os.path.dirname(log_file) | ||
if directory and not os.path.exists(directory): | ||
os.makedirs(directory) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to add a variable that allows users to decide whether the previous log file should be saved or removed. I mean something like this :
if os.path.exists(log_dir):
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
new_log_dir = f"debug/player_logs_{timestamp}"
shutil.move(log_dir, new_log_dir)
@@ -10,6 +17,7 @@ fi | |||
|
|||
team_name="CLS" | |||
rpc_port=50051 | |||
debug=false | |||
|
|||
# help function | |||
usage() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add -d command to usage function so can people find the -d command
start-team.sh
Outdated
@@ -1,5 +1,12 @@ | |||
#!/bin/bash | |||
|
|||
# remove logs directory | |||
rm -rf logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
base on what i said in the logger_utils i think you should change here if we want to add that feature
@SK2iP Thank you! |
No description provided.