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

More logging #300

Closed
mickaelistria opened this issue Oct 1, 2022 · 4 comments
Closed

More logging #300

mickaelistria opened this issue Oct 1, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@mickaelistria
Copy link
Contributor

We should provide a way to enable more logging in LemMinX-Maven, as many issues found in m2e are hard to debug. Logging should be off by default but easy enough to turn on with some system property for instance. Log should be written to file to not pollute the standard streams that LSP connection may use.
@angelozerr Does lemminx provide some logging strategy to reuse? Or a logging technology to use? Ideally, I'd like to go for System.Logger.

@mickaelistria mickaelistria added the enhancement New feature or request label Oct 1, 2022
@rgrunber
Copy link
Contributor

See https://github.com/eclipse/lemminx/blob/b11ed6b6fa20e141ef7bbe28b883b5b51986be13/org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/logs/LogHelper.java#L38 . Currently this is set to log to a file using the Java logging API. On initialize, the client passes xml.logs.file

[Trace - 11:42:56 a.m.] Sending request 'initialize - (0)'.
Params: {
    ...
    ...
    "initializationOptions": {
        "settings": {
            "xml": {
                ...
                ...
                "logs": {
                    "client": true,
                    "file": "/home/rgrunber/.config/Code/User/workspaceStorage/ec222aa9662a14fec1c42fa672b05253/redhat.vscode-xml/lemminx.log"
                },
                ... 
                ...
            }
        }
    }
}

@mickaelistria
Copy link
Contributor Author

See eclipse-wildwebdeveloper/wildwebdeveloper#974 (comment) for an example of how LemMinX logging can be harder than it seems.
It's adding complexity that logging this Java-based language server requires unspecified messages via LSP transport and and cannot be set with regular Java system properties (which is properly spec'd and integrated in many many places). Is there a way to simplify LemMinX so it becomes more standard here and make that the Log options are only configured and overridden if they're set in initialization options and using the usual configuration through system properties instead?

@angelozerr
Copy link
Contributor

Any contribution are welcome for LemMinx to fix this issue.

@mickaelistria
Copy link
Contributor Author

We've used the current log strategy and settings in Wild Web Developer, and they're good enough at the moment. No need for extra work here.

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

No branches or pull requests

3 participants