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

Bug fixes to unified logs #1039

Merged
merged 4 commits into from
Dec 25, 2024

Conversation

kga245
Copy link
Contributor

@kga245 kga245 commented Dec 23, 2024

Fixed: The code assumes data.output always contains pdf, docx, and json properties without validating their existence.

Fixed: The code unconditionally prepends 'outputs/' to accessData paths without first checking if they already start with 'outputs/', potentially causing redundant path prefixes.

Reverted: The "Download Logs" JSON link is now always rendered for all report types, regardless of the previous condition. reverted to conditional and will only display if report type is chatBoxSettings.report_type === 'research_report'

The code assumes data.output always contains pdf, docx, and json properties without validating their existence.

The code unconditionally prepends 'outputs/' to accessData paths without first checking if they already start with 'outputs/', potentially causing redundant path prefixes.

Reverted the "Download Logs" JSON link so it is not always rendered for all report types, regardless of the previous condition.
Doing some housekeeping.
@kga245
Copy link
Contributor Author

kga245 commented Dec 24, 2024

Late edition to this, fyi.

Title: refactor(server): remove unused logging configuration

Description

Removes redundant logging configuration that was creating an unused server_log.txt file. The actual research logging functionality is properly handled by CustomLogsHandler.

Changes

  • Removed unused logging configuration from backend/server/server.py
  • Removed unused setup_research_logging import and related startup code
  • No changes to core logging functionality (research outputs and logs remain intact)

Testing

  • Verified that research outputs still generate correctly in the outputs folder
  • Confirmed that server_log.txt is no longer created unnecessarily
  • All existing logging functionality continues to work as expected

Type of Change

  • Code cleanup (non-breaking change that improves code organization)
  • Performance improvement (removes unnecessary file operations)

Copy link
Owner

@assafelovic assafelovic left a comment

Choose a reason for hiding this comment

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

You rock, thank you!

@assafelovic assafelovic merged commit dd61cdc into assafelovic:master Dec 25, 2024
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