Closed kankaristo closed 9 years ago
@kankaristo can you come to our company slack.
Glad you like the package.
I like your snippet, but I don't think coffeescript in language packages are a very good idea. And I see nobody else during something similar.
I currently look for filetypes txt
and log
, and try to do a first line match for a time stamp. Maybe this can be improved to suit your needs instead?
True, I couldn't find any other language-*
package that has a lib/
directory. I kind of wish Atom had support for something like this, since some log files just end in "log", not necessarily ".log" (e.g. /var/log/syslog
). Sometimes the file name doesn't have "log" in it, but it's inside /var/log/
or a logs/
directory, etc.
I guess I'll close this issue and stick to having the snippet in init.coffee
. :)
Unrelated to this issue, but have you considered adding .out
(and maybe .output
) to the list of file types? It's less common than .log
, but Atom actually creates a log file in ~/.atom/nohup.out
on Linux (at least when run from the terminal).
I added out
, output
and syslog
to file formats. And added a link to your init.coffee snippet to readme for others to find.
Thanks for a great package, this and tail are a perfect match.
While most do, some log files don't have the
.log
extension, so I put this in myinit.coffee
:This automatically sets the grammar to
source.log
, if the file doesn't have a grammar set and if the name contains the word "log".Could something similar (with cleaner code) be added by default to the package?