Closed milancurcic closed 2 years ago
Yes in a production environment it's not beneficial printing them to the console. There's a problem though since we use FPM even the stderr statements are given out to stdout which means we will have to parse every output before storing the errors in a log file. I'll try experimenting with solutions.
Currently, the backend prints the output of programs to stdout, see lines 80 and 90 in backend/app.py:
https://github.com/fortran-lang/playground/blob/17abc35c5259d46503394b7a2def499cf070ebbd/backend/app.py#L78-L90
In production, we redirect stdout and stderr to their respective log files. It's easy for a playground user to create very large output (e.g. by printing values of a large array). This has two issues:
I think we should remove these print statements. What do you think?