File size: 560 Bytes
baa8e90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class DreamLog:
    def __init__(self, debug_active=False):
        self._debug = debug_active

    def _print(self, text: str, *args, **kwargs):
        if args or kwargs:
            text = text.format(*args, **kwargs)
        print("[DREAM] " + text)

    def error(self, text: str, *args, **kwargs):
        self._print(text, *args, **kwargs)

    def info(self, text: str, *args, **kwargs):
        self._print(text, *args, **kwargs)

    def debug(self, text: str, *args, **kwargs):
        if self._debug:
            self._print(text, *args, **kwargs)