Skip to content

Add path logging when certain files can't be found - #355

Merged
AngeloTadeucci merged 1 commit into
MS2Community:masterfrom
mouzedrift:logging
Mar 10, 2025
Merged

Add path logging when certain files can't be found#355
AngeloTadeucci merged 1 commit into
MS2Community:masterfrom
mouzedrift:logging

Conversation

@mouzedrift

@mouzedrift mouzedrift commented Mar 9, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Updated error notifications to display the exact locations of missing files.
    • Added a direct download link for a missing server file to streamline resolution.
    • Enhanced the clarity of messages for missing environment configuration files, making troubleshooting easier.

@coderabbitai

coderabbitai Bot commented Mar 9, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This update revises error messages in two files. In Maple2.File.Ingest/Program.cs, the errors for missing .m2d files now include the specific file paths, and the message for Server.m2d additionally provides a download link. In Maple2.Tools/Dotenv.cs, the error message for a missing .env file now shows its expected location. No changes were made to public or exported entities.

Changes

File(s) Change Summary
Maple2.File.Ingest/Program.cs Updated error messages for missing Xml.m2d, Exported.m2d, and Server.m2d files to include file paths; added a download link for Server.m2d.
Maple2.Tools/Dotenv.cs Updated error message for a missing .env file to include its specific expected path.

Possibly related PRs

  • fix: seeding & setup #218: Modifies command-line handling and control flow in Maple2.File.Ingest/Program.cs, directly relating to the error message adjustments in this PR.

Suggested reviewers

  • Zintixx

Poem

I'm a little rabbit here to say,
New error paths brighten up the day.
Missing files now show where to be found,
With links and paths so nicely renowned.
Hoppin' along with a joyful cheer,
CodeRabbit leaps—so fine and clear!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc683f8 and 9add798.

📒 Files selected for processing (2)
  • Maple2.File.Ingest/Program.cs (1 hunks)
  • Maple2.Tools/Dotenv.cs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: format
  • GitHub Check: build
🔇 Additional comments (4)
Maple2.Tools/Dotenv.cs (1)

10-10: Enhanced error message with path information

The addition of the file path in the error message significantly improves troubleshooting by showing exactly where the code is looking for the .env file. This change aligns perfectly with the PR objective of adding path logging.

Maple2.File.Ingest/Program.cs (3)

52-52: Improved error reporting with file path

Adding the specific path to the Xml.m2d file in the error message makes troubleshooting much more straightforward. This enhancement helps users quickly identify where the application is looking for the file.


56-56: Improved error reporting with file path

Similar to the previous change, including the path for the Exported.m2d file provides useful context for the error, helping users understand exactly where the file should be located.


60-61: Great enhancement with both path and download link

This is an excellent improvement that not only shows where the file should be located but also provides a direct download link. Going the extra mile to include the download URL significantly improves the user experience by offering an immediate solution to the problem.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@AngeloTadeucci
AngeloTadeucci merged commit 127e21e into MS2Community:master Mar 10, 2025
@mouzedrift
mouzedrift deleted the logging branch March 26, 2025 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants