Closed shtalinberg closed 1 month ago
@shtalinberg The log itself is coming from pygls
, this extension does not specifically do any logging of its own in this manner. There is likely configuration issue with how the logging is setup. The above code does now show how this is hooked up. Are you enabling logging at the process level, i.e., at python process launch. Can you share more details on how the logging is setup?
@karthiknadig
This happens because pylint
loads the project to perform analysis. In this case, the pygls
server we use also configures its own logging. The issue is not with the extension or the pylint server, but more with how the logging was configured (in pygls
or you package). Basically, it comes down to how the filtering for the logging is set up. The issue here is that pygls
, pylint
and your project are all getting loaded in the same process.
There is a workaround, at least with the extension:
set "pylint.path" : ["${interpreter}", "-m", "pylint"]
this should isolate the two packages.
Note that this does not prevent any other packages logging to be propagated to your logs. This is one another thing to try:
'loggers': {
'': {
'handlers': ['logfile_main'],
'level': 'INFO',
'propagate': False, # Prevent other loggers from propagating to this one
},
},
Hi
Diagnostic Data
Reproduction Steps:
every click in editor with .py file add lines to my project log-file like
[2024-08-06 13:27:05,360] INFO 140179885633536 [pygls.protocol.json_rpc:386] Sending data: {"id": 13, "jsonrpc": "2.0", "result": null}
Extra Details
My logging settings in Django project
video how it is happening
https://github.com/user-attachments/assets/23500274-e908-4245-b04a-7d136de300d1