17.02.2016, 11:57
Hello!
Is it a good practice to keep log files open throughout the uptime of the server instead of fopen & fclose everytime you log something?
E.g
I usually keep files open, but it seems that pawn people don't do this.Is there a reason or what?It's obv. faster to open once.
LE:I don't see any issue memory wise as there's only about 20 not that large files to keep open.
Is it a good practice to keep log files open throughout the uptime of the server instead of fopen & fclose everytime you log something?
E.g
Код:
-fopen -fwrite -fclose REPEAT EVERYTIME vs GLOBAL var file + fopen REPEAT fwrite ON SHUTDOWN fclose
LE:I don't see any issue memory wise as there's only about 20 not that large files to keep open.