Pocketmine-mp: Disable server.log saving to disk

Created on 6 Aug 2017  路  9Comments  路  Source: pmmp/PocketMine-MP

Some people don't use the server.log, like myself. I understand some use it to look for errors on the server, but I have other ways of doing so and the server.log is just an extra file that I don't want there. I don't ever use it and I have a feeling that lots of other people don't use it either.

Most helpful comment

Writing the server.log uses harddisk memory not RAM (random access memory).
PocketMine writes the server.log asynchronously, so it has almost no impact on server performance.
If you are concerned about the server.log taking memory, you may also make a cronjob to clean the server.log periodically.

All 9 comments

Writing the server.log uses harddisk memory not RAM (random access memory).
PocketMine writes the server.log asynchronously, so it has almost no impact on server performance.
If you are concerned about the server.log taking memory, you may also make a cronjob to clean the server.log periodically.

Ahhhh. But wouldn't it be more convenient to remove it from saving altogether? A switch for this would be nice.

Ahhhh.

Kinda indicated that I didn't know it was saved asynchronously. Sorry I didn't know that, now I do and you don't need to repeat to me what I literally JUST read above.

And, maybe I don't want logs of the server saving taking up disk space. I haven't looked at my server logs for my current server, ever. If I suspect a bug I just look through the server's screen session. Therefore, I do not NEED the server logs. Yeah I understand YOU might use it to find console errors. Cool, guess what? I have a preferred method of doing things and don't do the same thing as you, and don't use the same method as you. The world doesn't revolve around you, surprising right?

Don't say "oh you're not in the right mind because you want to disable logs", I'm completely in the right mind, I just do things differently I'm sorry. The benefit to me is, there aren't useless server.log files with bullshit that I am never going to look at. Did that make more sense to you? K.

Thank you for the suggestion on how to remove it currently myself, SOFE. But I'd like some way in the pocketmine.yml or server.properties to disable logs from saving. I know I could do cronjobs, but I feel like other people would like a way of disabling the server.log saving aswell without needing to use those (Like on MCPE server hosting companies that use multicraft). Not saying its necessarily the goto if you aren't very well with the PocketMine API and _constantly_ need to go and check the server.log for errors with plugins. But some people don't need it.

@SOF3 But what if the server is being hosted on a single core. This brings us back to the "don't abuse asynchronous tasks because they delay pocketmine's chunk sending", just without the abuse.

1164 - we been here before

@Muqsit You should read dktapps comment there.

@mal0ne-23 hostile much?

Duplicate of #1164

@Muqsit being single-core has nothing to do with anything - disk I/O _doesn't use the CPU_.

This would be particularly inconvenient to implement properly as it would require loading configuration before the Server is created. This is problematic because of the way Config depends on Server for various things.

Spoons such as Genisys hacked this by having the logger thread quit partway through startup, leaving it in a stopped, un-joined state. This is an unpleasant solution and as such will not be considered.

TL;DR: this can't be done without hacks.

My bad, that Steadfast README should've elaborated a bit on this topic.

To clarify, the logger has its own dedicated thread - it doesn't use asynchronous tasks. Therefore there is no impact to server performance because the dedicated thread is supposed to sit and wait anyway.

@TheDiamondYT1 excuse me?

It appears there was a bug in the MainLogger causing disk writes to be synchronized with the calling thread. This actually _did_ waste main thread time. The bug has been fixed as of https://github.com/pmmp/PocketMine-MP/commit/4e9af1ac4561c5fdca8769c7ffe517bbbad8435f.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

L3ice picture L3ice  路  3Comments

MisteFr picture MisteFr  路  3Comments

Muqsit picture Muqsit  路  3Comments

jasonwynn10 picture jasonwynn10  路  3Comments

XDqrkneZ picture XDqrkneZ  路  3Comments