Pryaxis / TSAPI

🛠🌳 The TShock Scaffold API enables developers to build plugins that hook directly into the Terraria game engine.
http://tshock.co/
GNU General Public License v3.0
109 stars 67 forks source link

-nolog startup flag #234

Closed ZakFahey closed 1 year ago

ZakFahey commented 1 year ago

The reason for this flag is if you're running a multi instance proxy setup, in which case multiple writes to ServerLog.txt would cause an error because multiple writers are writing to the same file. While you can use Attach() to replace the default writer with something else that doesn't have this problem, there is still a small window where the writer is opened and written to before you can do that, making it possible for such a startup error to happen if the timing is bad. While this sets the default writer to nothing, you can still use Attach() to attach a new writer in your own plugin.