Open shtalinberg opened 1 month ago
I think black formatter extension is how this issue manifested. But any project using pygls
could trigger this. I suspect, something might have gone wrong with how the logger has been configured.
1 question - why it use my django-project log-file ?
To be honest, I'm not entirely sure, it looks like your logging configuration is being applied to the Python process hosting the VSCode black formatter.
The only reasons why I can think of are
black
and pygls
as part of your django project? (Which seems unlikely)LOGGING
variable, where is it/how does it get used?2 question - how I can disable it?
The best solution would be to try figure and out why the formatting process is picking up your configuration but failing that, it should at least be possible to work around it.
Looking at this part of your configuration
'loggers': {
'': {
'handlers': ['logfile_main'],
'level': 'INFO',
'propagate': True,
},
},
It's very generic, have you tried only listing the loggers you are interested in e.g.?
'loggers': {
'my_django_project': {
'handlers': ['logfile_main'],
'level': 'INFO',
'propagate': True,
},
},
Or adding a section to specifically disable pygls
'loggers': {
'': {
'handlers': ['logfile_main'],
'level': 'INFO',
'propagate': True,
},
'pygls': {
'level': 'ERROR',
'handlers': []
}
},
(I don't have much experience with this style of logging configuration, so you may have to play around a bit to get the syntax right)
Hope that helps!
Heh ..., sorry guys. I found who does that - it's an extension Pylint - v2023.10.1 from Microsoft
Hi
this one line below generate a lot of lines in my django-project https://github.com/openlawlibrary/pygls/blob/0f6005cf522f48889d7eb69e7d76c70ce75c119d/pygls/protocol/json_rpc.py#L387 I have a lot of lines like this
[2024-08-05 17:18:37,510] INFO 140162374721536 [pygls.protocol.json_rpc:386] Sending data: {"id": 344, "jsonrpc": "2.0", "result": []}
I think it's related to using
black
formatting with vscode1 question - why it use my django-project log-file ? 2 question - how I can disable it?
My log config