It would be great to add an option to disable logging in pmmp, just like i remember it from java servers. Reasons to do this: The user might have limited space on his server, for example on paid vhost Log files are unnecessary for the user as the server does not throw any error / relevant information Log files are getting too big to handle when being opened via external programs
This is something that I've been dicing with the thought of for a while. It looks easier than it really is due to some circular dependencies between Config and Server. These aren't solvable without breakages to the API. Right now (for a 3.x line) the only practical way to do this would be to add some kind of CLI option such as --disable-logging or similar. As for log files getting too big, I think log rotation would be a better solution for this problem. Log files compress well.
@dktapps Wouldn't it be enough to just add a config-true check here?: https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/utils/MainLogger.php#L312 we did that on a spoon once, it worked without any issues
Coupling. MainLogger should not have dependency on the Server to prevent mutual dependency between different modules. The settings to MainLogger should be passed in the MainLogger constructor. However, MainLogger was constructed in PocketMine.php, which is before server settings are loaded.