-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
38 lines (28 loc) · 1.27 KB
/
Copy pathtest.py
File metadata and controls
38 lines (28 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from dlog import *
l = Logger(line_length=120, time_format="local-%H:%M:%S", compact=True)
# my_data = {'a': 'xyz', 'b': 1000000, 'c': ['uvw '*100]*10,
# 'd': [_ for _ in range(1000)]}
# l.info('hello-world'*40 + " hi", my_data, color=MAG, divider=MAG,
# show_metadata=False)
# l.info('hello-world ' + " hi", data={"a": "b", "c": [1, 2, 123]},
# color=YELLOW, divider=YELLOW)
# l.debug('hello-world ' + " hi", data={"a": "b", "c": [1, 2, 123]},
# color=YELLOW, divider=YELLOW+UND)
# l.warning('hello-world ' + " hi", data={"a": "b", "c": [1, 2, 123]},
# color=YELLOW, divider=YELLOW+UND)
# l.error('hello-world ' + " hi", data={"a": "b", "c": [1, 2, 123]},
# color=YELLOW, divider=YELLOW+UND)
# l.critical('hello-world ' + " hi", data={"a": "123_456", "c": [1, 2, 123456]},
# color=YELLOW, divider=YELLOW+UND)
# l.critical("Hello friend.", div=MAG)
# l.crit("Hello friend.", div=MAG)
# l("Hello friend.", div=GRN) # shortcut for l.info
# try:
# x = 5 / 0
# except Exception as e:
# l.info(exc=e)
# x = {"a": "b", "c": [_ for _ in range(100)]}
# l.json(x, msg="json format:") # json format for quick copying
# l.MAGENTA
x = {"a": ({"X": 1, "Y": 2}, {"X": 3, "Y": 4}, {"X": [6, 7], "Y": [8, 9]})}
l.info(data=x, end="\n")