Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

logfilter prepend date/time and some field to every INPUT text lines.

ex:

$ ls
file1   file2  file3

$ ls | python logfilter.py
2011-10-19 15:43:36,188  file1
2011-10-19 15:43:36,188  file2
2011-10-19 15:43:36,202  file3

If you want to change log format:

$ python logfilter.py -C > log.conf
$ ls |python logfilter.py -c log.conf
Wed, 19 Oct 2011 15:44:39 - root - INFO - log.conf
Wed, 19 Oct 2011 15:44:39 - root - INFO - logfilter.py

Recent activity

shimizukawa

Commits by shimizukawa were pushed to shimizukawa/logfilter

547f803 - fix: __name__ overriding break `__name__ == '__main__'` statement.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.