-
Notifications
You must be signed in to change notification settings - Fork 630
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
chore(log): rework std/log
to work without deprecated Deno.Writer
#4021
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 tasks
iuioiua
reviewed
Dec 24, 2023
iuioiua
suggested changes
Dec 28, 2023
Sure, TS private keyword or JS hash prefix?
|
Hash prefix please 🙂 |
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
All suggestions applied 🙏 ready for another review 🎉 |
iuioiua
changed the title
chore(log): rework std/log to no longer depend on the deprecated Writer
chore(log): rework Dec 28, 2023
std/log
to work without deprecated Deno.Writer
iuioiua
approved these changes
Dec 28, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Thank you for this.
This was referenced Dec 28, 2023
33 tasks
Hi! With this attempt to log circa 4096 octets message just dumps the process. import { RotatingFileHandler } from "https://deno.land/std@0.217.0/log/mod.ts"
const logger = new RotatingFileHandler(
"DEBUG",
{
filename: "/tmp/123",
maxBytes: 4000000,
maxBackupCount: 10,
},
)
logger.log("x".repeat(4096))
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempting to solve #3907
Previous attempt of #3969 was trying to use
std/streams/buffer.ts
and the streams API, but moving to async flushes resulted in potentially lost logs.Now just solving with a
Uint8Array
and aArrayBuffer
and a number pointer.