Open graue70 opened 5 years ago
Hi,
This issue has been open for some time. I was looking for a solution to the same problem today (some of my log files did not end with .log
), and I think I have found something.
In your IntelliJ IDE, go to File > Settings > Editor > File Types. Scroll down the list and click on the record named Log files
. There, on the right, you can add a custom file extension. Save, and re-open your log file in your IDE, it should work fine. At least, that is the case for me.
Problem
Files with names like
program.log.2019-08-08
program.log.2019-08-08_15-57
program.log.2019-08-08_15-57-46
are not recognised as log files. Files with these kinds of names are automatically created by for example the
logging.handlers.TimedRotatingFileHandler
in python after a roll over.Solution attempts
.log.
OR ends with.log
. (There will probably be false positives because of some filenames likemy.log.program.py
.).log
extension. (There will probably be false negatives because it is hard to name all kinds of timestamps.).log
are numbers as this should cover most timestamps (except something likeprogram.log.2019-August
). (This should result in less false positives than option 1 and less false negatives than option 2.)