This adds dictionary based logging support. Dictionary based logging is binary based where one big difference is that static strings are stored as pointers instead of the whole string. This results in reduced space requirements for storing log messages in certain scenairos. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
23 lines
437 B
Python
23 lines
437 B
Python
#!/usr/bin/env python3
|
|
#
|
|
# Copyright (c) 2021 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
"""
|
|
Abstract Class for Dictionary-based Logging Parsers
|
|
"""
|
|
|
|
import abc
|
|
|
|
|
|
class LogParser(abc.ABC):
|
|
"""Abstract class of log parser"""
|
|
def __init__(self, database):
|
|
self.database = database
|
|
|
|
@abc.abstractmethod
|
|
def parse_log_data(self, logdata, debug=False):
|
|
"""Parse log data"""
|
|
return None
|