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

Introduce option to control the format of file log timestamp #583

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

rdmark
Copy link
Member

@rdmark rdmark commented Dec 15, 2023

Introduces a boolean afp.conf option "log microseconds", enabled by default, which turns on and off microsecond timestamps in file logs.

@rdmark
Copy link
Member Author

rdmark commented Dec 15, 2023

The four code level bugs aren't newly introduced, I believe. Sonar reports them because the surrounding code has been changed.

bin/ad/ad.c Outdated Show resolved Hide resolved
@rdmark rdmark force-pushed the rdmark-issue-580 branch 3 times, most recently from ca3ffbe to 9bccbe9 Compare December 16, 2023 10:12
@rdmark
Copy link
Member Author

rdmark commented Dec 16, 2023

@slowfranklin After sleeping on it, I propose that we flip the boolean: Name the option "log microseconds", make it "yes" by default. (Still maintain the same default behavior as before this change.)

It makes more logical sense that the option is additive: When enabled something gets appended. When disabled something gets removed.

It's a minor nuance, but I think it will make it easier for users to understand the option.

Thoughts?

@slowfranklin
Copy link
Member

slowfranklin commented Dec 16, 2023 via email

…580

- afp.conf option "log microseconds"
- Defaults to "yes"
- Set to "no" to log with seconds
- Only takes effect when logging to file (not syslog)
Copy link

sonarcloud bot commented Dec 16, 2023

Quality Gate Failed Quality Gate failed

Failed conditions

E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

@rdmark
Copy link
Member Author

rdmark commented Dec 16, 2023

@slowfranklin Commits squished and ready approval!

@rdmark rdmark changed the title Introduce option to log to file with timestamps in seconds Introduce option to control the format of file log timestamp Dec 16, 2023
@rdmark rdmark merged commit a9c4ec2 into main Dec 16, 2023
3 of 4 checks passed
@rdmark rdmark deleted the rdmark-issue-580 branch December 16, 2023 23:59
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.

None yet

3 participants