# Path: duct/logs/follower.py
# class LogFollower(object):
#     def __init__(self, logfile, parser=None, tmp_path="/var/lib/duct/",
#                  history=False):
#     def cleanStore(self):
#     def storeLast(self):
#     def readLast(self):
#     def get_fn(self, fn, max_lines=None):
#     def get(self, max_lines=None):
# 
# Path: duct/logs/parsers.py
# class ApacheLogParserError(Exception):
# class ApacheLogParser(object):
#     def __init__(self, fmt):
#     def _parse_date(self, date):
#     def alias(self, field):
#     def _parse_format(self, fmt):
#     def parse(self, line):
#     def pattern(self):
#     def names(self):


from twisted.trial import unittest
from duct.logs import follower, parsers
import datetime
import os




class TestLogs(unittest.TestCase):
 
    def test_logfollow(self):
        try:
            os.unlink('test.log.lf')
            os.unlink('test.log')
        except:
            pass

        log = open('test.log', 'wt')
        log.write('foo\nbar\n')
        log.flush()


# Path: duct/logs/follower.py
# class LogFollower(object):
#     def __init__(self, logfile, parser=None, tmp_path="/var/lib/duct/",
#                  history=False):
#     def cleanStore(self):
#     def storeLast(self):
#     def readLast(self):
#     def get_fn(self, fn, max_lines=None):
#     def get(self, max_lines=None):
# 
# Path: duct/logs/parsers.py
# class ApacheLogParserError(Exception):
# class ApacheLogParser(object):
#     def __init__(self, fmt):
#     def _parse_date(self, date):
#     def alias(self, field):
#     def _parse_format(self, fmt):
#     def parse(self, line):
#     def pattern(self):
#     def names(self):


# Path: duct/tests/test_logs.py
from twisted.trial import unittest
from duct.logs import follower, parsers
import datetime
import os





class TestLogs(unittest.TestCase):
 
    def test_logfollow(self):
        try:
            os.unlink('test.log.lf')
            os.unlink('test.log')
        except:
            pass

        log = open('test.log', 'wt')
        log.write('foo\nbar\n')
        log.flush()


        f = follower.LogFollower('test.log', tmp_path=".", history=True)