Skip to content
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

Date of clone is not available in log file (solution included) #177

Open
folkeorg opened this issue Feb 19, 2024 · 0 comments
Open

Date of clone is not available in log file (solution included) #177

folkeorg opened this issue Feb 19, 2024 · 0 comments

Comments

@folkeorg
Copy link

Log file output only contains time. If logfile is appendes then there is no way of knowing then previous clones were made. If logfile is over-written then creation of the file tells when clone was made.

However, by appending date to start_time and stop_time, that only are used in the logfile output, the date can be logged too. The duration is still calculated correctly as it uses other variables. The solution is it add %F to date command.

Before:
start_time=date '+%H:%M:%S' (in 2 places)
stop_time=date '+%H:%M:%S'

After:
start_time=date '+%F %H:%M:%S' (in 2 places)
stop_time=date '+%F %H:%M:%S'

Result in logfile:
" Start - 2024-02-19 11:00:37 End - 2024-02-19 11:03:38 Elapsed Time - 3:01"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant