Include or exclude files by filename pattern
mmillsAtREPAY opened this issue ยท 2 comments
Our team is using the structured logging plugin primarily to support good coding practices with Serilog and MS logging, and I really appreciate the insights and suggestions it provides.
We have a very large monolithic solution (~130 projects), which I wish was not the case, but I mention it because Rider will often take a long time to reindex, etc. after a build. For the same reason, a full rebuild can result in a large build log file:
Unfortunately, the plugin's analysis engine doesn't seem to take kindly to these build logs when they are large. About 15 minutes after opening the 12 MB log file in the image above, I get this:
Often I'll just go to Task Manager and issue an "End Task" command for Rider (instead of waiting for the JRE to realize it has run out of memory) so I can continue working.
It seems like any one of these build logs that's more than a few hundred KB in size will cause a massive CPU and memory usage spike. The image below shows the IDE's state after opening a 3 MB build log file. This file size didn't cause an out-of-memory condition, but the IDE did show me a "low memory" warning, and it's basically unusable with this file open.
Edit: I did end up getting an out-of-memory dialog from Rider a few minutes after I opened this issue. The IDE never did return to a responsive state.
This might not be an issue in and of itself: I don't know how common it is to have build log files of this size, and I don't know if logs in a format that the plugin does recognize are handled more efficiently.
My request is either for Structured Logging to hard-code ignoring JetBrainsLog.ReSharperBuild_*.log
(so that the log file just opens in an editor window), or that you provide a way to exclude filenames from consideration by pattern, and not just assume that every file whose name ends with .log
should be analyzed.
Hi @mmillsAtREPAY
Thank you for the feedback! ๐๐ป
Our team is using the structured logging plugin primarily to support good coding practices with Serilog and MS logging, and I really appreciate the insights and suggestions it provides.
I'm happy that you find the plugin useful. ๐๐ป
Unfortunately, the plugin's analysis engine doesn't seem to take kindly to these build logs when they are large. About 15 minutes after opening the 12 MB log file in the image above, I get this:
Why do you think that's the issue in the plugin? On the screenshot, I can see Java VM options, but the plugin analysis is written in C#.
Could you please provide a small repro solution with the build log files without sensitive data? I'll try to investigate the problem.
Btw, have you tried to exclude log files from code analysis?
https://www.jetbrains.com/help/rider/Code_Analysis__Configuring_Warnings.html#exclude_items
@olsh you're quite welcome.
I got a chance to test excluding *.log
from Rider's code analysis, and I experienced exactly the same behavior after opening a 2 MB file. I decided to do a little more digging, and disabled the structured logging plugin. Afterward, opening the same 2 MB file resulted in the same behavior. With a little more digging, I was able to trace the behavior to JetBrains' own ideolog plugin. When I disabled that plugin and re-enabled Structured Logging, I no longer experienced the OOM error.
I'll take it up with JetBrains. Apologies for the confusion!