nrwl / nx-console

Nx Console is the user interface for Nx & Lerna.
https://nx.dev
MIT License
1.31k stars 213 forks source link

In Intellij, language server logs always end in a newline #2282

Open aqeelat opened 1 month ago

aqeelat commented 1 month ago

Current Behavior

2024-10-10 13:45:12,827 [165160238]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - Refresh workspace started called from nxls
2024-10-10 13:45:12,827 [165160238]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2024-10-10T10:45:12.827Z - Retrieving workspace configuration

2024-10-10 13:45:12,827 [165160238]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2024-10-10T10:45:12.827Z - Using local Nx package at {project_root}/node_modules/nx/src/project-graph/file-utils.js

2024-10-10 13:45:12,827 [165160238]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2024-10-10T10:45:12.827Z - Using local Nx package at {project_root}/node_modules/nx/src/project-graph/project-graph.js

2024-10-10 13:45:12,827 [165160238]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2024-10-10T10:45:12.827Z - Using local Nx package at{project_root}/node_modules/nx/src/project-graph/file-map-utils.js

2024-10-10 13:45:12,827 [165160238]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2024-10-10T10:45:12.827Z - Using local Nx package at {project_root}/node_modules/nx/src/daemon/client/client.js

2024-10-10 13:45:12,827 [165160238]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2024-10-10T10:45:12.827Z - Using local Nx package at {project_root}/node_modules/nx/src/utils/output.js

2024-10-10 13:45:12,829 [165160240]   INFO - #dev.nx.console.nxls.client.NxlsLanguageClient - [Nxls] - 2024-10-10T10:45:12.828Z - createProjectGraphAndSourceMapsAsync

Some logs coming from NxlsLanguageClient have an extra newline. However, the offending logs are not present in the KT code, but rather in the language server.

These logs are fine: https://github.com/nrwl/nx-console/blob/35432eac005398d1b2d1beaea988dccb22dc7091/apps/intellij/src/main/kotlin/dev/nx/console/nxls/client/NxlsLanguageClient.kt#L55-L59

Expected Behavior

For the logs to not have this newline. This is making the logs harder to read (usually empty lines mean there are stack traces coming after them)

Steps to Reproduce

Install plugin View IDE logs

Failure Logs / Images / Videos

Environment