Exclude log files from search Follow
Hi,
when I use "Find in Path...", I often use no file mask, because I want to find occurrences in haml/erb/rb-files.
But I always get the question to skip the log files, because they are too big. Of course I never want to search in there.
Maybe "file mask" could accept a regular expression, so I can search for "all but *.log" or something?
Regards,
neogrande
Please sign in to leave a comment.
Hello neogrande,
In RubyMine 1.5, these too big files will be skipped automatically - no need
to enter a file mask.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
My solution to this issue was to configure log file rotation for the development environment (in development.rb):
That way the logs don't grow that much (depends on what you do a day ).
As everybody may produce artifacts that he doesn't want to search in (e.g. logs or any other program output) but that he may want to access from within RubyMine I'd suggest an option to ignore folders for search in the project structure configuration. You already may exclude some but those cannot be opened in RubyMine then...
Custom scopes would be an alternative, but from my point of view this is too far away and would make searching more work than required (as you'd have to think about that always).
But back to my rolling logs: RubyMine doesn't like it when the logs roll - it simply looses track. Technically I think I know why but from a user perspective I don't care. You may want to give it some thoughts...
Apart from that I got the feeling that I have more issues in viewing the console or log output in the Run window (i.e. no output appearing there) since running 1.1.1. But that's nothing I can confirm yet, may have been bad luck. I have a terminal open anyways
I really wish that the file mask could accept multiple patterns (*.rb, *.erb, *.rjs, *.rhtml). Other IDE's support this, and I find it very useful for filtering out log and other non-code files.
Hello George,
Multiple masks will be supported in RubyMine 1.5.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hopefully there will be the ability in 1.5 to include as well as exclude based on mask (by directory and filetype). Also, the ability easily recall search configurations would be very nice (assign a hotkey for example). ArachnoRuby did this nicely.
Thanks,
Dan
In the field masks type !*.log,
Here is more info on this topic https://www.jetbrains.com/help/idea/2016.3/find-and-replace-in-path.html