Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: no logtail dependency #11

Closed
peterlundberg opened this issue Feb 24, 2012 · 8 comments
Closed

feature request: no logtail dependency #11

peterlundberg opened this issue Feb 24, 2012 · 8 comments

Comments

@peterlundberg
Copy link

With logtail not being available everywhere and often a perl implementation, I suggest implementing an embedded python solution which should also simplify process handling etc. Below is a snippet what could be a useful starting point.

with open(filename) as log_fd:
    offset_filename = os.path.join(OFFSET_ROOT_DIR,filename)
    if not os.path.exists(offset_filename):
        os.makedirs(os.path.dirname(offset_filename))
        with open(offset_filename, 'w') as offset_fd:
            offset_fd.write(str(0))
    with open(offset_filename, 'r+') as offset_fd:
        log_fd.seek(int(offset_fd.readline()) or 0)
        new_logrows_handler(log_fd.readlines())
        offset_fd.seek(0)
        offset_fd.write(str(log_fd.tell()))
@softwaregravy
Copy link

Also, logtail now appears to be deprecated.
http://packages.debian.org/sid/logtail

@mrtazz
Copy link
Contributor

mrtazz commented Oct 21, 2012

Is there any recommendation what to use instead of logtail? If not it might make sense to at least provide an optional alternative to it.

@janpio
Copy link

janpio commented Feb 11, 2013

+1

2 similar comments
@dennisosimon
Copy link

+1

@travis-bear
Copy link

+1

@travis-bear
Copy link

This might be useful:
https://pypi.python.org/pypi/pygtail/0.2.1

From the description:
A python "port" of logcheck's logtail2.

@gilgamezh
Copy link
Contributor

+1 to pygtail!

@synapsechris
Copy link

#67

There's a PR for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants