zephyr/scripts/logging/dictionary/parser/__init__.py
Daniel Leung a5ab1a7518 logging: add support for dictionary based logging
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>
2021-04-28 22:25:42 +02:00

22 lines
386 B
Python

#!/usr/bin/env python3
#
# Copyright (c) 2021 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
"""
Dictionary-based Logging Parser Module
"""
from .log_parser_v1 import LogParserV1
def get_parser(database):
"""Get the parser object based on database"""
db_ver = int(database.get_version())
if db_ver == 1:
return LogParserV1(database)
return None