-
Notifications
You must be signed in to change notification settings - Fork 301
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
should use fwrite not fputs #180
Labels
good first issue
Good for newcomers
Milestone
Comments
felipejinli
added a commit
to felipejinli/swift-log
that referenced
this issue
Apr 4, 2021
felipejinli
added a commit
to felipejinli/swift-log
that referenced
this issue
Apr 4, 2021
felipejinli
added a commit
to felipejinli/swift-log
that referenced
this issue
Apr 6, 2021
felipejinli
added a commit
to felipejinli/swift-log
that referenced
this issue
Apr 6, 2021
felipejinli
added a commit
to felipejinli/swift-log
that referenced
this issue
Apr 6, 2021
weissi
added a commit
that referenced
this issue
Apr 6, 2021
Replaced `fputs` with `fwrite`, added test and made spelling corrections Motivation: If a 0 byte is logged, `fputs` would not output the content after the 0 byte making it harder to debug (see #180). `fwrite` uses a count argument so content after 0 byte can be logged. Modifications: Replaced `fputs` with the correct call to `fwrite`. Added helper internal func `contiguousUTF8(_ string: String) -> String.UTF8View`. Added `testStdioOutputStreamWrite()` to test ability to log content after 0 byte. Result: Improved debugging experience Co-authored-by: Johannes Weiss <[email protected]>
fixed by #188 |
Please close this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
swift-log/Sources/Logging/Logging.swift
Line 828 in 12d3a86
We should use
fwrite
and notfputs
here... Usually doesn't matter unless we print a 0 byte which could be a hard to debug thing if we lose everything after the 0 byte withfputs
.The text was updated successfully, but these errors were encountered: