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

The log to disk loses exactly one character when the data has no spaces and the remaining of the line is just one character greater than the maximum line length #31

Closed
jachguate opened this issue Feb 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jachguate
Copy link
Owner

The log to disk loses exactly one character when the data has no spaces and the remaining of the line is just one character greater than the maximum line length of the disk writer.

Take this example:

  DiskLogger.MaxLineSize := 39;
  jachLog.LogInfo(' 40 1234567890123456789012345678901234567890');
  jachLog.LogInfo('1234567890123456789012345678901234567890');
  jachLog.LogInfo(' 41 12345678901234567890123456789012345678901');
  jachLog.LogInfo('12345678901234567890123456789012345678901');
  jachLog.LogInfo(' 50 1234567890123456789012345678901234567890');
  jachLog.LogInfo('12345678901234567890123456789012345678901234567890');

The resulting log is:

2023-02-27 14:19:38:616 00000D00 Info   40
                                       123456789012345678901234567890123456789
2023-02-27 14:19:38:616 00000D00 Info  123456789012345678901234567890123456789
2023-02-27 14:19:38:616 00000D00 Info   41
                                       123456789012345678901234567890123456789
                                       01
2023-02-27 14:19:38:616 00000D00 Info  123456789012345678901234567890123456789
                                       01
2023-02-27 14:19:38:632 00000D00 Info   50
                                       123456789012345678901234567890123456789
                                       01234567890
2023-02-27 14:19:38:632 00000D00 Info  123456789012345678901234567890123456789
                                       01234567890

The messages including exactly 40 consecutive chars in the message lost the last '0' char. All other messages are correct.

@jachguate jachguate added the bug Something isn't working label Feb 27, 2023
@jachguate jachguate added this to the v 2.4 milestone Feb 27, 2023
@jachguate jachguate self-assigned this Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant