Exclude log files from search

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

6 comments
Comment actions Permalink

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

2
Comment actions Permalink

Hello neogrande,

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?


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!"


0
Comment actions Permalink

My solution to this issue was to configure log file rotation for the development environment (in development.rb):

# roll log daily
config.logger = Logger.new config.log_path, 'daily'

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

Hello George,

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.


Multiple masks will be supported in RubyMine 1.5.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

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

0

Please sign in to leave a comment.