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

Feature Request: Log timestamps trailing zeros. #2479

Closed
Frederico-Messa opened this issue Aug 29, 2023 · 2 comments
Closed

Feature Request: Log timestamps trailing zeros. #2479

Frederico-Messa opened this issue Aug 29, 2023 · 2 comments

Comments

@Frederico-Messa
Copy link

Frederico-Messa commented Aug 29, 2023

Is your feature request related to a problem? Please describe.

The log generated by onedrive, when enabled in the configs (enable_logging = "true"), does not have trailing zeros in its timestamps, thus the log entries may not be aligned depending on the viewer (even some with tab alignment).

Example:

2023-Aug-29 18:09:29.5192566	Downloading file example1.txt ... done.
2023-Aug-29 18:09:30.34505	Downloading file example2.txt ... done.
2023-Aug-29 18:11:16.2325544	Downloading file example3.txt ... done.
2023-Aug-29 18:11:17.1303661	Downloading file example4.txt ... done.
2023-Aug-29 18:11:17.9084088	Downloading file example5.txt ... done.
2023-Aug-29 18:11:19.204023	Downloading file example6.txt ... done.
2023-Aug-29 18:11:20.5430072	Downloading file example7.txt ... done.
2023-Aug-29 18:11:21.9568301	Downloading file example8.txt ... done.
2023-Aug-29 18:17:15.3398712	Uploading modified file example9.txt ... done.

In my text viewer, it appears this way:

2023-Aug-29 18:09:29.5192566     Downloading file example1.txt ... done.
2023-Aug-29 18:09:30.34505  Downloading file example2.txt ... done.
2023-Aug-29 18:11:16.2325544     Downloading file example3.txt ... done.
2023-Aug-29 18:11:17.1303661     Downloading file example4.txt ... done.
2023-Aug-29 18:11:17.9084088     Downloading file example5.txt ... done.
2023-Aug-29 18:11:19.204023 Downloading file example6.txt ... done.
2023-Aug-29 18:11:20.5430072     Downloading file example7.txt ... done.
2023-Aug-29 18:11:21.9568301     Downloading file example8.txt ... done.
2023-Aug-29 18:17:15.3398712     Uploading modified file example9.txt ... done.

Describe the solution you'd like

A solution would be to change this line to:

auto timeString = leftJustify(currentTime.toString(), 28, '0');

after importing std.string.

Check [leftJustify reference].

Describe alternatives you've considered

I don't know much about the D language, so I don't know a better solution.

Additional context

No response

@abraunegg abraunegg added this to the v2.5.0 milestone Sep 26, 2023
@abraunegg abraunegg linked a pull request Sep 26, 2023 that will close this issue
@abraunegg
Copy link
Owner

@Frederico-Messa
Many thanks for your feedback. This issue has been fixed in v2.5.x that is in active development.

As such, I am closing this feature request as being completed.

@abraunegg
Copy link
Owner

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Repository owner locked as resolved and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants