完成01-basic作业 - #125
Open
gbx-cyber2 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR completes the missing implementations for the 01-basic homework tasks in the LogParser component, adding support for parsing/dumping request and internal log events and documenting the approach in the homework report.
Changes:
- Implemented parsing for
requestandinternalevents inLineParser(including exception splitting for internal logs). - Implemented visitor dumping for
RequestLogEntryandInternalLogEntry, and wired upAccept()for these entry types. - Added
docs/01-basic/report.mddescribing the solution and reflections.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/LogParser/Visitors/KeyValueVisitor.cs | Adds dictionary dump support for RequestLogEntry and InternalLogEntry. |
| src/LogParser/Parser/LineParser.cs | Implements creation/parsing logic for request and internal log messages. |
| src/LogParser/Models/LogEntries.cs | Implements Accept() for RequestLogEntry and InternalLogEntry to enable visitor dispatch. |
| docs/01-basic/report.md | Adds the written report for the 01-basic homework submission. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+71
to
+75
| var separatorIndex = internalMessage.Exception.IndexOf(": "); | ||
| if (separatorIndex < 0) | ||
| { | ||
| throw new FormatException($"Invalid exception format: {internalMessage.Exception}"); | ||
| } |
This file contains hidden or 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
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.
暑培:队式作业提交
基本信息
提交说明
01-basic作业提交通道 #32