feat(logs): store stderr and stdout with details in dedicated log messages table

This commit is contained in:
Matthieu Bessat 2024-07-25 23:23:58 +02:00
parent c40c6aedef
commit 55438fbd83
12 changed files with 155 additions and 27 deletions

View file

@ -1,14 +1,15 @@
import os, sys
import random
import os
import string
from time import sleep
def main():
iterations = random.randint(10, 150)
speed = float(os.getenv("SIMULATION_SPEED") or 0.8)
print(f"Going for {iterations=}")
print(f"Going for {iterations=} with {speed=}")
for i in range(iterations):
if random.uniform(0, 1) > 0.8:
print("Some error we will see", file=sys.stderr)
print(
str(i) + " " +
''.join(
@ -24,6 +25,7 @@ def main():
(random.uniform(0, 5) if random.uniform(0, 1) > 0.99 else 0))
)
print("Done, script is finished")
if __name__ == "__main__":
main()