Skip to content
Snippets Groups Projects
Commit 9a595b00 authored by Robin Mueller's avatar Robin Mueller
Browse files

optimization for log

parent aa6d9356
No related branches found
No related tags found
No related merge requests found
......@@ -219,13 +219,17 @@ class TmTcPrinter:
""" Add a specific string to the current print buffer """
self.__print_buffer += string_to_add
def add_print_buffer_to_file_buffer(self, add_cr_to_file_buffer: bool = False):
def add_print_buffer_to_file_buffer(self, add_cr_to_file_buffer: bool = False,
cr_before: bool = True):
"""
:return:
Add to file buffer. Some options to optimize the output.
"""
if self.do_print_to_file:
if add_cr_to_file_buffer:
self.__file_buffer += self.__print_buffer + "\r\n\r\n"
if cr_before:
self.__file_buffer += "\r\n" + self.__print_buffer + "\r\n"
else:
self.__file_buffer += self.__print_buffer + "\r\n\r\n"
else:
self.__file_buffer += self.__print_buffer + "\r\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment