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

introduce output level for BBj to suppress irrelevant output #158

Open
StephanWald opened this issue Oct 3, 2024 · 1 comment
Open

introduce output level for BBj to suppress irrelevant output #158

StephanWald opened this issue Oct 3, 2024 · 1 comment
Labels
enhancement New feature or request vscode

Comments

@StephanWald
Copy link
Member

StephanWald commented Oct 3, 2024

The story behind:

I probably have a unique setup, but one of my VSCode workspaces is located on a remote cloud drive (think Dropbox). Since it's on a cloud drive, I can work on the project from different machines. Therefore, while it appears as though my files are hosted on a local drive, they're actually on a remote server. Because of that, they cannot be accessed as quickly as files that are actually on my computer's SSD. The end result is that I get 8,000+ lines similar to the following in the BBj Output:

Linking (>100ms) file:///Users/ndecker/Library/CloudStorage/Sync/development/git/DWCProjects/FileSearcher/FileSearcher.bbj took 192ms

That's due to this code in the bbj-linker.ts file:

        const elapsed = Date.now() - started
        const threshold = 100
        if (elapsed > threshold) {
            console.debug(`Linking (>${threshold}ms) ${document.uri} took ${elapsed}ms`)
        }

Because there are thousands and thousands of informational messages in the BBj Output that refer to linking times exceeding 100ms, I can't find actual errors or problems. IOW, there's too much noise, making it impossible to find the signal (any useful information) buried amongst tons of linking messages.

It would help me tremendously if this could be addressed in some way, as it's almost impossible for me to locate actual warnings and errors. I currently have to copy the BBj Output into my editor and execute a regex in order to remove all the linking messages and see if there are any errors or warnings.

I can think of a few different solutions:
Separate the errors, warnings, and informational messages (like the browser's Developer Tools Console does)
Add a configuration property that lets me set the level of output messages (like BBj and the Eclipse plug-in do)
Add a configuration property that lets me set the threshold value to something other than a hardcoded value of 100ms
I don't know enough about VSCode Extensions and what's available to us to say what's possible and the best solution. But there are a number of ways to prevent all of the linking messages from appearing in the BBj Output, which I personally don't find to be helpful. The linking time may be useful to others in some scenarios, but it's making it difficult for me to be able to see problems that the extension encountered at a glance.

@StephanWald StephanWald added enhancement New feature or request vscode labels Oct 3, 2024
@dhuebner
Copy link
Collaborator

dhuebner commented Oct 7, 2024

@StephanWald
This is a developer debug log, we can just remove it or comment out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vscode
Projects
None yet
Development

No branches or pull requests

2 participants