-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Chore: Setup "Jan Improvements Proposal" workflow #534
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| spec: | ||
| @echo "Initiating a Spec..." | ||
| @last_number=$$(ls $(CURDIR)/jan-[0-9][0-9][0-9]-* | sort -V | tail -n 1 | cut -d '-' -f 2); \ | ||
| last_number=$$(echo $$last_number | sed 's/^0*//'); \ | ||
| next_number=$$(printf "%03d" $$(( $$last_number + 1 ))); \ | ||
| read -p "Enter Spec title: " title; \ | ||
| title=$$(echo $$title | tr ' ' '-'); \ | ||
| cp $(CURDIR)/spec-template.md $(CURDIR)/jan-$$next_number-$$title.md; \ | ||
| date=$$(date +%Y-%m-%d); \ | ||
| usernames=$$(git config user.name); \ | ||
| sed -i '' 's/{SPEC-NUM}/'$$next_number'/g' $(CURDIR)/jan-$$next_number-$$title.md; \ | ||
| sed -i '' 's/{TITLE}/'$$title'/g' $(CURDIR)/jan-$$next_number-$$title.md; \ | ||
| sed -i '' 's/{DATE}/'$$date'/g' $(CURDIR)/jan-$$next_number-$$title.md; \ | ||
| sed -i '' 's/{USERNAMES}/'$$usernames'/g' $(CURDIR)/jan-$$next_number-$$title.md |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # jan-001: Application Logs Framework | ||
|
|
||
| | Proposal | jan-001 | | ||
| | ---------- | ----------------------------------------------------- | | ||
| | Title | App Logging | | ||
| | Authors | @louis-jan | | ||
| | Permalink | | | ||
| | Discussion | [issue #528](https://github.com/janhq/jan/issues/528) | | ||
| | Status | Idea | | ||
|
|
||
| ## Changelog | ||
|
|
||
| | Date | Author | Changes | | ||
| | ------------ | ---------- | ------------- | | ||
| | Nov 2nd 2023 | @louis-jan | Initial Draft | | ||
|
|
||
| ## Summary | ||
|
|
||
| This proposal suggests the implementation of an "App logging as file and log window" feature, which aims to address the problem of limited visibility into the operation of a production application. Currently, logs (info, verbose, error) are hidden, making it challenging for both users and developers to debug and support the application. The proposed solution involves logging application-wide activities to a file while also enabling real-time log monitoring through a dedicated log window within the application. | ||
|
|
||
| ## Motivation | ||
|
|
||
| ### Problem Description | ||
| The lack of proper logging in production applications results in several challenges: | ||
|
|
||
| 1. Debugging Difficulty: When an issue arises in a production environment, developers have limited access to essential information about what happened, making it challenging to diagnose and resolve problems effectively. | ||
| 2. Support Challenges: Users often encounter errors or unexpected behavior, and support teams struggle to gather the necessary logs to understand the issue and provide a solution promptly. | ||
| 3. Lack of Real-time Insights: Real-time monitoring is essential for identifying and responding to critical events. The absence of a log window within the application prevents timely reactions to events. | ||
|
|
||
| ### Use Case Example | ||
| Consider an e-commerce application. In the current state, when a user faces an issue during checkout, there's no easy way for support or development teams to see what went wrong in real time. This results in frustration for the user and a loss of business for the company | ||
|
|
||
| ```ts | ||
| # Current Status (Without the Feature) | ||
| try: | ||
| # Checkout logic | ||
| # ... | ||
| except Exception as e: | ||
| # Error handling | ||
| console.log(err) | ||
| # Insufficient logging | ||
| ``` | ||
|
|
||
| Without proper logging, it is challenging to diagnose the issue and provide immediate assistance. | ||
|
|
||
| ## Proposed solution | ||
|
|
||
| ### High-level overview | ||
| The proposed solution introduces the following key changes: | ||
|
|
||
| 1. Application-wide Logging: Implement a logging mechanism that logs application-wide activities to a designated log file. This ensures that all relevant information is captured for later analysis and debugging. | ||
| 2. Real-time Log Window: Create a log window within the application that displays log entries in real time. Users and developers can open this window to monitor logs, allowing them to react promptly to events and errors. | ||
|
|
||
| ```ts | ||
| # With the Proposed Feature | ||
| try: | ||
| # Checkout logic | ||
| # ... | ||
| except Exception as e: | ||
| # Error handling | ||
| log.error(f"Error when downloading model: {e}") | ||
| # Proper logging | ||
|
|
||
| ``` | ||
|
|
||
|  | ||
|
|
||
|
|
||
| ### Specification | ||
|
|
||
| - The logging system will support different log levels (e.g., info, verbose, error) to ensure that the right level of detail is captured. | ||
| - Log entries will be timestamped and categorized to aid in the analysis and debugging process. | ||
| - The log window will provide options for filtering and searching log entries for ease of use. | ||
|
|
||
|
|
||
| ### Compatibility | ||
|
|
||
| This proposal aims to preserve backward compatibility by ensuring that the new logging system does not break existing functionality or affect existing applications negatively. It should not alter the semantics of valid programs. | ||
|
|
||
|
|
||
| ### Other concerns | ||
|
|
||
| - Implementation: Careful consideration should be given to the choice of logging framework and implementation details. | ||
| - Security: Access to logs and log window functionality should be restricted to authorized users to prevent potential security risks. | ||
|
|
||
| ### Open questions | ||
|
|
||
| - What will be the default log file location, and how will it be configurable? | ||
| - Should log entries be persisted and rotated over time to prevent excessive file size? | ||
|
|
||
| ## Alternatives | ||
|
|
||
| Alternative approaches may involve integrating with existing third-party logging systems or cloud-based log management platforms. However, this proposal focuses on a built-in solution for application-wide logging and real-time monitoring. | ||
|
|
||
| ## Related work | ||
|
|
||
| This proposal is inspired by similar features in various application development frameworks and tools. | ||
|
|
||
| ## FAQ | ||
|
|
||
| No frequently asked questions at this time. | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # jan-{SPEC-NUM}: {TITLE} | ||
|
|
||
| | Proposal | jan-{SPEC-NUM} | | ||
| | ---------- | -------------- | | ||
| | Title | {TITLE} | | ||
| | Authors | | | ||
| | Permalink | | | ||
| | Discussion | | | ||
| | Status | Idea | | ||
|
|
||
| ## Changelog | ||
|
|
||
| | Date | Author | Changes | | ||
| | ---- | ------ | ------------- | | ||
| | | | Initial Draft | | ||
|
|
||
| ## Abstract | ||
|
|
||
| Summary. Please keep it very short. | ||
|
|
||
| ## Motivation | ||
|
|
||
| Why? | ||
|
|
||
| ## Specification | ||
|
|
||
| What, how? | ||
| - UX Mockups | ||
| - Code Interfaces | ||
|
|
||
| ## Appendix | ||
|
|
||
| Everything else goes here. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@louis-jan I prefer this format, where new Improvement Proposals are opened as PRs on Github. Everyone can then comment in-line and discuss