Public Member Functions | |
def | __init__ |
def | _fetch_first_lines |
def | set_first_lines |
def | get_first_lines |
def | test_first_lines |
def | find_size_last_message_tag |
def | analyse_log_file |
def | start_entry |
def | write_entry |
def | end_entry |
def | reset |
def | _test_keywords |
def | update_keywords |
def | update_ignore_error |
def | _extract_time |
def | _extract_error_number |
This class provides all the neccessarey tools to parse and work up to logfile of the SRB-System.
Definition at line 136 of file server_classes.py.
|
Constructor Definition at line 139 of file server_classes.py. |
|
Thhis function takes a line from the logfile and extract the error number. Definition at line 553 of file server_classes.py. |
|
This function takes a line from the logfile and extracts the time from there. Definition at line 538 of file server_classes.py. |
|
This function returns the first 15 lines from current logfile without saving them anywhere. Definition at line 157 of file server_classes.py. |
|
This is a recursive function, which tests if a list of keywords is part of a string (AND relation). If all keywords found 0 is returned, otherwise -1 keywordlist = list of all keywords amount_of_keywords = number of keywords in list teststring = string, which needs to be investigated return -1 if line is not interesting return 0 if line is taken Definition at line 455 of file server_classes.py. |
|
takes the templog file and goes through each lines and searches for keywords, if keywords are found, the line and the two lines before and after are dumped into a xml file, which the client can collect. This function uses the system function write to create the xml file. The dom function were to ineffectiv and sax unflexible. parser_file_name = file name of the file, which needs to be parsed Definition at line 228 of file server_classes.py. |
|
This function inserts an end tag into the XML file. (name = tag name) Definition at line 435 of file server_classes.py. |
|
This function find out, how many bytes the last message tag needs. This function was necessary, because this new xml messages have to be added into the client xml file. Since the creating of this file is not very straightforward using known techniques like sax or dom, the last tag gets deleted, the new messages added and the last tag writen again. fd = file descriptor of the file msg_tag = message tag to search for Definition at line 207 of file server_classes.py. |
|
This function returns the member variable _first_lines. Definition at line 187 of file server_classes.py. |
|
This function resets member variable, in case of a new log file. Definition at line 448 of file server_classes.py. |
|
This function saves the first 15 lines of the log file into the member variable. Definition at line 173 of file server_classes.py. |
|
This function inserts a start tag into the XML file. (name = tag name) Definition at line 384 of file server_classes.py. |
|
This function compares the first 15 lines of a log file and return 0 if they are the same, otherwise -1. Definition at line 193 of file server_classes.py. |
|
This function updates the ignore_error list. error = new ignore list Definition at line 530 of file server_classes.py. |
|
This function updates the member variable keywords. keys = new keyword list Definition at line 522 of file server_classes.py. |
|
This function inserts an entry into the xml file. tagname = tag name content = message between start and end tag Definition at line 397 of file server_classes.py. |