Skip to content

Commit aeb14dd

Browse files
committed
add logprinter for future debug/testing
1 parent dcef155 commit aeb14dd

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

application/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ frontend/.gitignore
2727

2828
backend/.gitignore
2929
backend/dist
30+
backend/logs_generator
3031
leveldb
3132
*_test.go
3233

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM python:3.10-slim-buster
2+
WORKDIR /code
3+
ADD logprint.py .
4+
5+
CMD ["python3", "logprint.py"]
6+
# docker build -t logprinter .
7+
# docker run --rm -it --name <any name to identify> logprinter
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import random
2+
import string
3+
import time
4+
5+
6+
def main():
7+
output = 0
8+
while True:
9+
str_len = random.randint(50, 100)
10+
output = ""
11+
for _ in range(str_len):
12+
output += random.choice(string.ascii_letters + ' ' + string.digits + ' ')
13+
output = random.choice(["INFO ", "DEBUG ", "WARNING ", "ERROR ", "", ""]) + output
14+
output = random.choice([output, output, output, " "])
15+
print(output)
16+
time.sleep(0.01)
17+
18+
19+
main()

0 commit comments

Comments
 (0)