Skip to content
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

Allow debug log flag #95

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Allow debug log flag #95

merged 1 commit into from
Feb 15, 2024

Conversation

nylonee
Copy link
Owner

@nylonee nylonee commented Feb 15, 2024

Closes #84

Summary by CodeRabbit

  • New Features
    • Introduced a new LOG_LEVEL configuration to adjust logging verbosity.
  • Documentation
    • Enhanced clarity on the necessity of a Plex Pass for generating RSS Feed URLs.
    • Improved formatting and wording in the Plex Pass alternative section.
  • Chores
    • Implemented logic to adjust log level based on the LOG_LEVEL environment variable.

Copy link

coderabbitai bot commented Feb 15, 2024

Walkthrough

This update introduces a new configuration option to adjust logging verbosity and clarifies the necessity of a Plex Pass for generating RSS Feed URLs, alongside adjustments in formatting and wording for better clarity. Additionally, it implements a mechanism to enable debug mode through an environment variable, addressing the need for enhanced debugging capabilities.

Changes

File(s) Change Summary
README.md Added LOG_LEVEL configuration, clarified Plex Pass requirement, adjusted formatting and wording
docker/entrypoint.sh Added logic to set log level based on LOG_LEVEL environment variable

Assessment against linked issues

Objective Addressed Explanation
Enable debug mode via a flag (#84)

Poem

In the code's deep burrow, under the moon's soft glow,
A rabbit hopped, with wisdom to bestow.
"To debug, to tweak, let the logs speak,
A flag, a pass, clarity we seek."
🌟 With every line, a mystery unwinds,
In the dance of codes, solutions we find.
🐇 "Fear not the night, for changes bring light,"
Whispered the rabbit, before hopping out of sight.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit-tests for this file.
  • 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 tests 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 generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 08193fc and 8b7c8ed.
Files ignored due to path filters (1)
  • src/main/resources/logback.xml is excluded by: !**/*.xml
Files selected for processing (2)
  • README.md (1 hunks)
  • docker/entrypoint.sh (1 hunks)

Comment on lines +94 to +96
if [ -n "$LOG_LEVEL" ]; then
CMD+=("-Dlog.level=$LOG_LEVEL")
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure the LOG_LEVEL variable is properly validated to prevent potential command injection or unexpected behavior. Consider adding a check to ensure it only contains expected values (e.g., DEBUG, INFO, WARN).

@@ -123,11 +123,15 @@ in [entrypoint.sh](https://github.com/nylonee/watchlistarr/blob/main/docker/entr
| ALLOW_ENDED_SHOW_DELETING | false | Boolean flag to enable/disable the full Watchlistarr sync for ended shows. If enabled, shows that have no more planned seasons and are not watchlisted will be deleted from Sonarr |
| ALLOW_CONTINUING_SHOW_DELETING | false | Boolean flag to enable/disable the full Watchlistarr sync for continuing shows. If enabled, shows that still have planned seasons and are not watchlisted will be deleted from Sonarr |
| DELETE_INTERVAL_DAYS | 7 | Number of days to wait before deleting content from the arrs (Deleting must be enabled) |
| LOG_LEVEL | INFO | Level of logging, set to DEBUG for more verbose logs, or WARN for less logs |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition of the LOG_LEVEL configuration option is well-documented. Ensure that the documentation clearly specifies the acceptable values for LOG_LEVEL and their impact on logging verbosity.

Comment on lines +130 to +134
The Plex Pass subscription is required to generate the RSS Feed URLs. Without a Plex Pass, the normal API calls are too
heavy-hitting on Plex's servers.

If the app detects that you are not a Plex Pass user (i.e. the app tries to generate an RSS URL, and it fails), it will
fall back into a periodic sync.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clarification regarding the necessity of a Plex Pass for generating RSS Feed URLs is helpful. Ensure that the explanation of the fallback mechanism for non-Plex Pass users is clear and concise, possibly by providing an example or more detailed description of how the periodic sync operates.

@nylonee nylonee merged commit 2528cf0 into main Feb 15, 2024
2 checks passed
@nylonee nylonee deleted the debug-logs branch February 15, 2024 21:41
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.

Allow users to enable debug mode
1 participant