feat(logs): store stderr and stdout with details in dedicated log messages table
This commit is contained in:
parent
c40c6aedef
commit
55438fbd83
12 changed files with 155 additions and 27 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue