Stephen Tozer 73a01952b5 [Dexter] Add a simple logging class to Dexter
Adds a basic logging class to Dexter that uses the existing PrettyOutput
class for printing and supports 3 levels of verbosity (note, warning,
error). Intended to consolidate the logging logic for Dexter into one
place, removing the need for conditional log statements and making it
easier for us later if we wish to use a more complete logging class.

Reviewed By: Orlando

Differential Revision: https://reviews.llvm.org/D144983
2023-03-15 19:25:37 +00:00

23 lines
810 B
Python

# DExTer : Debugging Experience Tester
# ~~~~~~ ~ ~~ ~ ~~
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""Generic non-dexter-specific utility classes and functions."""
import os
from dex.utils.Environment import is_native_windows, has_pywin32
from dex.utils.PrettyOutputBase import PreserveAutoColors
from dex.utils.RootDirectory import get_root_directory
from dex.utils.Timer import Timer
from dex.utils.WorkingDirectory import WorkingDirectory
if is_native_windows():
from dex.utils.windows.PrettyOutput import PrettyOutput
else:
from dex.utils.posix.PrettyOutput import PrettyOutput
from dex.utils.Logging import Logger