logalyzer.records.RecordKeeper(Base)
class documentation
Part of logalyzer.records
(View In Hierarchy)
I am the master record keeper that gets fed info from the subprocesses. I operate with deferreds; supply a database URL to my constructor so I can do the recordkeeping persistently via that database.
Call my startup
method right away and then my transactions can make use of DTK
and
{sift.IPMatcher} instances via dtk and ipm attributes to
avoid database activity.
Method | __init__ | Undocumented |
Method | startup | Returns a deferred that fires when my DB transactor is running and my transactor has preloaded its IPMatcher. |
Method | shutdown | Undocumented |
Method | getNewBlockedIPs | Returns a list of those rejected IP addresses that are to be blocked and were identified since the last call to this method. |
Method | consumerFactory | Constructs and returns a reference to a new ProcessConsumer
that obtains nasty IP addresses and new records from a process parsing a
particular logfile. |
Method | fileInfo | See database.Transactor.fileInfo |
Method | purgeIP | No summary |
Method | addRecord | Adds the supplied record to the database for the specified datetime, if it's not already there. |
Inherited from Base:
Class Method | linger | Undocumented |
Method | myDir 0 | Undocumented |
Method | myDir 1 | Undocumented |
Method | myDir | Undocumented |
Static Method | dtFormat | Undocumented |
Static Method | deferToDelay | Undocumented |
Method | msgHeading | No summary |
Method | msgBody | Send a new line of message body to the last heading for this instance,
or the instance whose ID is specified via the keyword ID . |
Method | msgOrphan | Undocumented |
Method | msgWarning | Undocumented |
Method | msgError | Undocumented |
Method | msgProgress | Undocumented |
Method | fileStatus | Undocumented |
Method | fileProgress | Undocumented |
Method | csvTextToList | Undocumented |
Static Method | checkPath | Undocumented |
Static Method | dirOfPath | Undocumented |
Method | filesInDir | No summary |
Method | pathInDir | Returns the absolute path of a file in my directory |
Method | cleak | No summary |
Method | gleak | Undocumented |
Returns a deferred that fires when my DB transactor is running and my transactor has preloaded its IPMatcher.
Shows progress loading IP addresses, one update per 1000 loaded.
Returns a list of those rejected IP addresses that are to be blocked and were identified since the last call to this method.
Constructs and returns a reference to a new ProcessConsumer
that obtains nasty IP addresses and new records from a process parsing a
particular logfile.
Purges my records (and database, if any) of entries from the supplied IP address and appends the IP to a list to be returned when I'm done so that a master list of purged IP addresses can be provided. Any further adds from this IP are ignored.
Returns | A Deferred that fires when the database has been updated, or
immediately if no database transaction is needed. |
Adds the supplied record to the database for the specified datetime, if it's not already there.
Note: Multiple identical HTTP queries occurring during the same second will be viewed as a single one. That shouldn't be an issue.
Returns a deferred that fires with a Bool indicating if a new entry was added to the database.