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

Feature: Logging Search Bar #9252

Open
DAlba-sudo opened this issue Dec 3, 2023 · 4 comments
Open

Feature: Logging Search Bar #9252

DAlba-sudo opened this issue Dec 3, 2023 · 4 comments
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug)

Comments

@DAlba-sudo
Copy link

Description

Inspired by a short exchange on the forum: https://forum.syncthing.net/t/feature-elasticsearch-integration/21186/4?u=dalba-sudo. I'm thinking of adding a search bar in the log section of the GUI.

Use Case

"I think much simpler than this the log interface in the GUI can use a simple text search. Show me all log lines that match GX6GIWE (a device) or a file name, or an error…" - mraneri

Here's my current idea for the filtering implementation:

  • add a filter function to the logging scope/class (kind of new angular, not sure what you'd call it).
    • called by ng-keyup callback on an input of type text (i.e., the "search bar").
    • only filters on keywords more than 2 characters long (if you want to look for something that is 2 characters long, use a wildcard as the third character?)
  • add an input of type text in the logViewerModalView

I've linked to a video demoing the current implementation - it's bare-bones and not currently designed for scale. Before I go back to the drawing board to think about ways to make this scalable for larger logs, I want to get feedback on the feature!

Demo: https://youtu.be/64B5Fa2fiq4

This is my first contribution to open-source, any feedback is appreciated (i.e., more detail explaining the feature, etc).

Cheers,
DAlba-Sudo

@DAlba-sudo DAlba-sudo added enhancement New features or improvements of some kind, as opposed to a problem (bug) needs-triage New issues needed to be validated labels Dec 3, 2023
@DAlba-sudo
Copy link
Author

I've implemented these changes in my own fork of the repo, going to wait to hear back before making a PR in case there's something that should be implemented before-hand.

@acolomb
Copy link
Member

acolomb commented Dec 3, 2023

Looks nice and I wouldn't mind adding this with a clean and performant implementation. I must admit though that I seldomly look at the logs and if so, usually not through the GUI, but by starting Syncthing on the console with appropriate piping. For troubleshooting a running instance though, this seems definitely good to have.

@tomasz1986
Copy link
Contributor

tomasz1986 commented Dec 3, 2023

Honestly, the log in the GUI is truncated so much that I'd say it's barely useful in itself. When I've had issues, every time I was forced to save full logs on the disk and look for the culprit there, as the point in time that mattered was always long gone in the GUI.

@DAlba-sudo
Copy link
Author

Interesting, I see what you mean. I've gone ahead and made a PR in case we decide to include it: #9255.

@calmh calmh removed the needs-triage New issues needed to be validated label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug)
Projects
None yet
Development

No branches or pull requests

4 participants