Skip to content

Adding option to customize log file timestamps. - #6338

Merged
pajlada merged 15 commits into
Chatterino:masterfrom
droidicus:log_file_timestamp_option
Jul 19, 2025
Merged

pajlada merged 15 commits into
Chatterino:masterfrom
droidicus:log_file_timestamp_option

Conversation

@droidicus

@droidicus droidicus commented Jul 15, 2025 •

Copy link
Copy Markdown
Contributor

This PR adds an option to change the formatting of the log file timestamps:
image

The option is hh:mm:aa by default to preserve the previous behavior.

The log file format changes when the options are changes:
image

Comment thread src/singletons/Settings.hpp Outdated
Comment on lines +155 to +156
BoolSetting customLogTimestamp = {
"/appearance/messages/customLogTimestamp", false};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bikeshed: This isn't really a custom timestamp. It's more like that the timestamp format is inherited. Wouldn't it be better to turn this into a string, so it's fully customizable and independent of the chat timestamp format?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted to follow the existing dropdown example for simplicity and uniformity, but would be fine with any changes.
I think my preference would be to either change the wording to more closely match "inherited" or adding a separate dropdown in the moderation/logs settings dialog. If a simple text box is prefered I can also make that change, but it is less user friendly in my view.

@droidicus droidicus Jul 15, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After looking at this a bit more, there are complications from the chat timestamp display option as well, I will refactor.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I refactored this to two dropdowns to allow the message timestamp format and log timestamp format to differ, let me know what you think.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/widgets/settingspages/GeneralPage.cpp Outdated
@droidicus
droidicus requested a review from Nerixyz July 15, 2025 23:59

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/widgets/settingspages/GeneralPage.cpp Outdated

@pajlada pajlada left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just some small nits wrt formatting & its default value, overall this looks good to me

Comment thread src/singletons/Settings.hpp Outdated
Comment thread src/widgets/settingspages/GeneralPage.cpp Outdated
Comment thread src/widgets/settingspages/GeneralPage.cpp Outdated
@fourtf

fourtf commented Jul 16, 2025

Copy link
Copy Markdown
Member

I'm on my phone, so I can't check the settings myself. But it looks to me like the log timestamp doesn't really fit into the messages section of the settings. It's not related to the messages that get displayed in the chat. Is there maybe a log section that this could fit in?

@pajlada

pajlada commented Jul 16, 2025

Copy link
Copy Markdown
Member

I'm on my phone, so I can't check the settings myself. But it looks to me like the log timestamp doesn't really fit into the messages section of the settings. It's not related to the messages that get displayed in the chat. Is there maybe a log section that this could fit in?

Yup! Under the moderation sidebar, under the Logs tab #6338 (comment)

@droidicus
droidicus requested a review from pajlada July 18, 2025 02:57
@droidicus
droidicus force-pushed the log_file_timestamp_option branch from 19738ff to 7117c17 Compare July 18, 2025 21:08
@pajlada
pajlada enabled auto-merge (squash) July 19, 2025 09:44
@pajlada
pajlada disabled auto-merge July 19, 2025 09:44
@pajlada
pajlada enabled auto-merge (squash) July 19, 2025 09:44
@pajlada
pajlada merged commit f20945e into Chatterino:master Jul 19, 2025
@droidicus
droidicus deleted the log_file_timestamp_option branch July 19, 2025 14:36
@pajlada

pajlada commented Jul 19, 2025

Copy link
Copy Markdown
Member

Thank you @droidicus! As a first-time contributor, you are now eligible to be listed in the About page in Chatterino.

If you want this, you can open a new PR where you modify the resources/contributors.txt file and add yourself to the list. Read the comments at the top for instructions.

babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
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.

4 participants