typegoose / typegoose/mongodb-memory-server
Pretty Print MongoDB server output
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 191
- Avg merge
- 4h 25m
- Merged PRs (30d)
- 10
Description
for mongodb 4.4, they have changed to use logs as json, currently we are printing them as-is, but it is pretty hard to debug as they are
this is a tracking issue for pretty printing this new log output
implementation details:
- only process the lines when debug mode is enabled (for the MongoInstance file)
- process each new line separately
- process JSON into something resembling like the old log format
- have a flag to disable this pretty-printing (because this can be really resource intensive)
also, a alternative could be to write something to read in the finished log and colorize and sort it for faster debugging
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MongoInstance file and inspect how MongoDB 4.4 JSON log lines are currently passed through when debug mode is enabled. Done means processing each line into an old-format-like output, with a flag to disable the resource-intensive formatting; the issue does not name a test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, typescript
- Domain
- databases, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100