Skip to content

Improve log file naming scheme#659

Merged
robin-nitrokey merged 2 commits intomasterfrom
log
Jun 24, 2025
Merged

Improve log file naming scheme#659
robin-nitrokey merged 2 commits intomasterfrom
log

Conversation

@robin-nitrokey
Copy link
Member

This PR changes the log file naming scheme to use a .log suffix (fixes #317) and to include the timestamp (to make it easier to find the correct log file). nitropy.log.14t5shdl becomes nitropy-1750752277-14t5shdl.log.

Copy link
Contributor

@sosthene-nitrokey sosthene-nitrokey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Nit: I think it would make sense to include the timestamp in a human-readable format instead (so the file would be nitropy-24-06-2025-10h32-14t5shdl.log).

@robin-nitrokey
Copy link
Member Author

That was actually my first implementation but I thought the POSIX timestamp would be easier to read in a filename. Changed to use the ISO timestamp instead: nitropy-2025-06-24T10:46:14-4jh3p3zi.log.

@robin-nitrokey
Copy link
Member Author

robin-nitrokey commented Jun 24, 2025

Windows does not allow colons in filenames, so now without separators: nitropy-20250624T112431-7is_1834.log.

This makes it easier to find the correct log file as they are now sorted
by timestamp when sorting alphabetically.
@robin-nitrokey robin-nitrokey merged commit 4139b44 into master Jun 24, 2025
49 checks passed
@robin-nitrokey robin-nitrokey deleted the log branch June 24, 2025 09:39
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

Successfully merging this pull request may close these issues.

Save log files with a proper .log ending

2 participants

Comments